-
Notifications
You must be signed in to change notification settings - Fork 15
/
word.toml
211 lines (202 loc) · 4.52 KB
/
word.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
analysis = '''
These benchmarks test the functionality of `\w`. A `\w` is generally either
equivalent to `[0-9A-Za-z_]`, or it's equivalent to the definition offered
in [UTS#18][uts18]. UTS#18 defines it as the union of the `Alphabetic`,
`Join_Control`, `gc=Mark`, `gc=Decimal_number` and `gc=Connector_Punctuation`
properties.
Where regex engines differ is the extent to which this can be toggled. Some
regex engines support both definitions. Some support *only* the ASCII variant
and some support *only* the Unicode variant.
These benchmarks aren't really intended to be used for collecting timing
measurements. These are just about verifying functionality.
[uts18]: https://unicode.org/reports/tr18/
'''
[[bench]]
model = "count"
name = "ascii-only"
regex = '\w'
haystack = 'δ'
count = [
# .NET doesn't permit disabling the Unicode variant of \w.
{ engine = 'dotnet.*', count = 1 },
# ICU doesn't permit disabling the Unicode variant of \w.
{ engine = 'icu', count = 1 },
{ engine = '.*', count = 0 },
]
engines = [
'dotnet',
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'icu',
'java/hotspot',
'javascript/v8',
'pcre2',
'pcre2/jit',
'perl',
'python/re',
'python/regex',
're2',
'regress',
'rust/regex',
'rust/regex/lite',
]
[[bench]]
model = "count"
name = "unicode-alphabetic"
regex = '\w'
unicode = true
haystack = 'δ'
count = [
# None of these regex engines support the Unicode variant of \w.
{ engine = 'go/regexp|javascript.*|re2|regress|rust/regex/lite', count = 0 },
{ engine = '.*', count = 1 },
]
engines = [
'dotnet',
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'icu',
'java/hotspot',
'javascript/v8',
'pcre2',
'pcre2/jit',
'perl',
'python/re',
'python/regex',
're2',
'regress',
'rust/regex',
'rust/regex/lite',
]
[[bench]]
model = "count"
name = "unicode-join-control"
regex = '\w'
unicode = true
haystack = "\u200D"
count = [
# None of these regex engines support the Unicode variant of \w.
{ engine = 'go/regexp|javascript.*|re2|regress|rust/regex/lite', count = 0 },
# None of these include \p{Join_Control} in their definition of \w.
{ engine = 'dotnet.*|hyperscan|pcre2.*|python/re', count = 0 },
{ engine = '.*', count = 1 },
]
engines = [
'dotnet',
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'icu',
'java/hotspot',
'javascript/v8',
'pcre2',
'pcre2/jit',
'perl',
'python/re',
'python/regex',
're2',
'regress',
'rust/regex',
'rust/regex/lite',
]
[[bench]]
model = "count"
name = "unicode-mark"
regex = '\w'
unicode = true
haystack = "\u0322"
count = [
# None of these regex engines support the Unicode variant of \w.
{ engine = 'go/regexp|javascript.*|re2|regress|rust/regex/lite', count = 0 },
# None of these include \p{gc=Mark} in their definition of \w.
{ engine = 'hyperscan|pcre2.*|python/re', count = 0 },
{ engine = '.*', count = 1 },
]
engines = [
'dotnet',
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'icu',
'java/hotspot',
'javascript/v8',
'pcre2',
'pcre2/jit',
'perl',
'python/re',
'python/regex',
're2',
'regress',
'rust/regex',
'rust/regex/lite',
]
[[bench]]
model = "count"
name = "unicode-decimal-number"
regex = '\w'
unicode = true
haystack = '᠕'
count = [
# None of these regex engines support the Unicode variant of \w.
{ engine = 'go/regexp|javascript.*|re2|regress|rust/regex/lite', count = 0 },
{ engine = '.*', count = 1 },
]
engines = [
'dotnet',
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'icu',
'java/hotspot',
'javascript/v8',
'pcre2',
'pcre2/jit',
'perl',
'python/re',
'python/regex',
're2',
'regress',
'rust/regex',
'rust/regex/lite',
]
[[bench]]
model = "count"
name = "unicode-connector-punctuation"
regex = '\w'
unicode = true
haystack = '⁀'
count = [
# None of these regex engines support the Unicode variant of \w.
{ engine = 'go/regexp|javascript.*|re2|regress|rust/regex/lite', count = 0 },
# None of these include \p{gc=Connector_Punctuation} in their definition
# of \w, although, they all at least include `_`, which is part of
# `Connector_Punctuation`.
{ engine = 'hyperscan|pcre2.*|python/re', count = 0 },
{ engine = '.*', count = 1 },
]
engines = [
'dotnet',
'dotnet/compiled',
'dotnet/nobacktrack',
'go/regexp',
'hyperscan',
'icu',
'java/hotspot',
'javascript/v8',
'pcre2',
'pcre2/jit',
'perl',
'python/re',
'python/regex',
're2',
'regress',
'rust/regex',
'rust/regex/lite',
]