-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbenchmark.txt
55 lines (47 loc) · 1.16 KB
/
benchmark.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
1.
INPUT:
(c((w)|e+)\?)*
(?:c(?:(?:w)|e+))*
a{2,2}|(c((w)|e+)\?)*[^^bd?\]]?$
^<([a-z]+)([^<a-z]+)*?(?:>(.*)<\/\1>|\s+\/>)$
^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$
[^\D12]+
^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$
^#?([a-f0-9]{6}|[a-f0-9]{3})$
^[a-z0-9_-]{6,18}$
^\w[-\w\d]\d{8}$
.?[\W]{3,16}$
^.?[.-.d \-~a-z0-9_-]{3,16}$
\(\(\(ab\)*c\)*d\)\(ef\)*\(gh\)\{2\}\(ij\)*\(kl\)*\(mn\)*\(op\)*\(qr\)*
(c((a)|e+)\?)*[^^bd?\]]?$
^#?([a-f0-9]{6}|[a-f0-9]{3})$
(a)\1+?\0+?
^<([a-z]+)([^<]+)*(?:>(.*)<\/\0>|\s+\/>)$
(|)((()|(|))|())
"(?:[^"\\]++|\\.)*+"
CMD:
time ./regxStr.out 100000 <input.txt >/dev/null
RESULT:
real 1m13.551s
user 1m11.940s
sys 0m1.190s
real 1m8.942s
user 1m7.630s
sys 0m1.090s
real 1m11.233s
user 1m9.970s
sys 0m1.140s
real 1m9.656s
user 1m8.170s
sys 0m1.130s
real 0m25.505s
user 0m24.370s
sys 0m1.090s
real 0m26.441s
user 0m25.080s
sys 0m1.280s
input samples increased(0m7.588s)
real 0m15.352s
user 0m13.680s
sys 0m1.660s