-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbenchmarks.txt
213 lines (184 loc) · 7.72 KB
/
benchmarks.txt
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
212
213
Notes:
64-bit Intel Core i5-2400 @ 3.10GHz
8GB DDR3 RAM @1333 MHz
Test file (mtent12.txt): 379897 lines, 19285324 bytes (19 MB)
Regex: Twain
=================================================
Program | Matched | Time
=================================================
dre2 | 2373 | 0.046315859
-------------------------------------------------
re2 | 2373 | 0.090810751
-------------------------------------------------
test.pl | 2373 | 0.182925577
-------------------------------------------------
test.rb | 2373 | 0.210724323
-------------------------------------------------
Regex: ^Twain
=================================================
Program | Matched | Time
=================================================
dre2 | 100 | 0.043168290
-------------------------------------------------
re2 | 100 | 0.057164131
-------------------------------------------------
test.pl | 100 | 0.171649525
-------------------------------------------------
test.rb | 100 | 0.218791856
-------------------------------------------------
Regex: Twain$
=================================================
Program | Matched | Time
=================================================
dre2 | 127 | 0.043216991
-------------------------------------------------
re2 | 0 | 0.074660506
-------------------------------------------------
test.pl | 127 | 0.157532800
-------------------------------------------------
test.rb | 127 | 0.191485190
-------------------------------------------------
Regex: Huck[a-zA-Z]+|Finn[a-zA-Z]+
=================================================
Program | Matched | Time
=================================================
dre2 | 83 | 0.066762667
-------------------------------------------------
re2 | 83 | 0.149471230
-------------------------------------------------
test.pl | 83 | 0.241247562
-------------------------------------------------
test.rb | 83 | 0.295520940
-------------------------------------------------
Regex: Tom|Sawyer|Huckleberry|Finn
=================================================
Program | Matched | Time
=================================================
dre2 | 2644 | 0.086962477
-------------------------------------------------
re2 | 2644 | 0.157981805
-------------------------------------------------
test.pl | 2644 | 0.266252325
-------------------------------------------------
test.rb | 2644 | 0.330634130
-------------------------------------------------
Regex: .{0,3}(Tom|Sawyer|Huckleberry|Finn)
=================================================
Program | Matched | Time
=================================================
dre2 | 2644 | 0.092502076
-------------------------------------------------
re2 | 2644 | 0.149695521
-------------------------------------------------
test.pl | 2644 | 3.048135588
-------------------------------------------------
test.rb | 2644 | 10.019868793
-------------------------------------------------
Regex: [a-zA-Z]+ing
=================================================
Program | Matched | Time
=================================================
dre2 | 81350 | 0.072189501
-------------------------------------------------
re2 | 81350 | 0.157544459
-------------------------------------------------
test.pl | 81350 | 0.275186455
-------------------------------------------------
test.rb | 81350 | 0.658475865
-------------------------------------------------
Regex: ^[a-zA-Z]{0,4}ing[^a-zA-Z]
=================================================
Program | Matched | Time
=================================================
dre2 | 4483 | 0.073770733
-------------------------------------------------
re2 | 4483 | 0.077531815
-------------------------------------------------
test.pl | 4483 | 0.168864588
-------------------------------------------------
test.rb | 4483 | 0.266795314
-------------------------------------------------
Regex: [a-zA-Z]+ing$
=================================================
Program | Matched | Time
=================================================
dre2 | 5360 | 0.067260316
-------------------------------------------------
re2 | 0 | 0.152784549
-------------------------------------------------
test.pl | 5360 | 0.180841684
-------------------------------------------------
test.rb | 5360 | 1.147318797
-------------------------------------------------
Regex: ^[a-zA-Z ]{5,}$
=================================================
Program | Matched | Time
=================================================
dre2 | 26236 | 0.288751796
-------------------------------------------------
re2 | 0 | 0.110412277
-------------------------------------------------
test.pl | 26236 | 0.252398492
-------------------------------------------------
test.rb | 26236 | 0.659768508
-------------------------------------------------
Regex: ^.{1,3}$
=================================================
Program | Matched | Time
=================================================
dre2 | 296 | 0.097733385
-------------------------------------------------
re2 | 0 | 0.084569880
-------------------------------------------------
test.pl | 296 | 0.242821810
-------------------------------------------------
test.rb | 296 | 0.339744173
-------------------------------------------------
Regex: ([a-f](.[d-m].){0,2}[h-n]){2}
=================================================
Program | Matched | Time
=================================================
dre2 | 61719 | 0.365179260
-------------------------------------------------
re2 | 61719 | 0.148715763
-------------------------------------------------
test.pl | 61719 | 1.157504035
-------------------------------------------------
test.rb | 61719 | 1.465843742
-------------------------------------------------
Regex: ([A-Za-z]awyer|[A-Za-z]inn)[^a-zA-Z]
=================================================
Program | Matched | Time
=================================================
dre2 | 639 | 0.182031755
-------------------------------------------------
re2 | 639 | 0.148394852
-------------------------------------------------
test.pl | 639 | 2.044079691
-------------------------------------------------
test.rb | 639 | 2.353169238
-------------------------------------------------
Regex: "[^"]{0,30}[?!.]"
=================================================
Program | Matched | Time
=================================================
dre2 | 5546 | 0.054212280
-------------------------------------------------
re2 | 5540 | 0.082516675
-------------------------------------------------
test.pl | 5546 | 0.214894009
-------------------------------------------------
test.rb | 5546 | 0.315580435
-------------------------------------------------
Regex: Tom.{0,30}river|river.{0,30}Tom
=================================================
Program | Matched | Time
=================================================
dre2 | 4 | 0.093899706
-------------------------------------------------
re2 | 4 | 0.144165322
-------------------------------------------------
test.pl | 4 | 0.278967078
-------------------------------------------------
test.rb | 4 | 0.407944528
-------------------------------------------------