-
Notifications
You must be signed in to change notification settings - Fork 316
Benchmark result of current develop branch
K.Kosako edited this page Oct 6, 2018
·
2 revisions
Version 6.9.0 vs. current develop branch (commit 274ec40fc616a0af6d4230662d9d9a499dc05eb7)
Encoding: UTF-8 (*text file is ASCII)
Current develop branch
[benchmark]$ ./bench
file size: 20045118, str len: 20045118
/Twain/: 19.8 msec.
/(?i)Twain/: 56.7 msec.
/[a-z]shing/: 16.1 msec.
/Huck[a-zA-Z]+|Saw[a-zA-Z]+/: 78.2 msec.
/\b\w+nn\b/: 1126.5 msec.
/[a-q][^u-z]{13}x/: 110.6 msec.
/Tom|Sawyer|Huckleberry|Finn/: 85.6 msec.
/(?i)Tom|Sawyer|Huckleberry|Finn/: 625.8 msec.
/.{0,2}(Tom|Sawyer|Huckleberry|Finn)/: 256.3 msec.
/.{2,4}(Tom|Sawyer|Huckleberry|Finn)/: 370.7 msec.
/Tom.{10,25}river|river.{10,25}Tom/: 127.8 msec.
/[a-zA-Z]+ing/: 1080.1 msec.
/\s[a-zA-Z]{0,12}ing\s/: 111.1 msec.
/([A-Za-z]awyer|[A-Za-z]inn)\s/: 272.9 msec.
/["'][^"']{0,30}[?!\.]["']/: 129.4 msec.
6.9.0
[benchmark]$ ./bench
file size: 20045118, str len: 20045118
/Twain/: 17.9 msec.
/(?i)Twain/: 181.8 msec.
/[a-z]shing/: 16.1 msec.
/Huck[a-zA-Z]+|Saw[a-zA-Z]+/: 77.9 msec.
/\b\w+nn\b/: 1179.2 msec.
/[a-q][^u-z]{13}x/: 2001.9 msec.
/Tom|Sawyer|Huckleberry|Finn/: 88.3 msec.
/(?i)Tom|Sawyer|Huckleberry|Finn/: 928.5 msec.
/.{0,2}(Tom|Sawyer|Huckleberry|Finn)/: 478.2 msec.
/.{2,4}(Tom|Sawyer|Huckleberry|Finn)/: 742.3 msec.
/Tom.{10,25}river|river.{10,25}Tom/: 130.0 msec.
/[a-zA-Z]+ing/: 1214.8 msec.
/\s[a-zA-Z]{0,12}ing\s/: 132.6 msec.
/([A-Za-z]awyer|[A-Za-z]inn)\s/: 292.0 msec.
/["'][^"']{0,30}[?!\.]["']/: 138.0 msec.
Reference: http://sljit.sourceforge.net/regex_perf.html
Mac OSX
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-in\
clude-dir=/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.2)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin