The Computer Language
25.02 Benchmarks Game

regex-redux

These are crowd sourced programs, contributed to the project by an ever-changing self-selected group.

We include both un-optimised programs and heavily optimised programs (look at the gz source code size). We include both single-thread programs and multi-thread programs (look at the cpu secs). We include [pdf] vector parallelism and even hand-written vector instructions.

 

(See rebar.)

Regex might be provided by wrapping a third-party library written in some-other programming language. How would you know?

Always look at the source code.

× source secs mem gz cpu secs
1.0 Ruby #9 30.77 221,237 340 30.72
1.2 Julia 5.19 714,330 414 5.26
1.3 F# #2 4.81 879,477 437 5.01
1.3 Ruby #2 23.42 221,233 444 23.39
1.4 Perl 22.37 212,926 471 22.35
1.4 Node.js #4 5.46 1,036,313 471 5.60
1.5 Chapel #2 3.58 391,442 498 4.49
1.5 Chapel #3 3.17 392,372 503 4.07
1.5 Dart aot #4 13.71 486,343 513 13.85
1.5 Python 3 8.96 459,624 515 16.43
1.6 Racket 24.07 1,382,437 548 23.99
1.8 F# #7 5.59 686,174 610 6.62
1.8 F# #6 1.81 787,112 622 5.07
1.9 C# naot 10.69 582,550 641 10.65
2.0 Dart aot #2 16.88 522,846 667 17.44
2.0 Node.js #3 4.31 839,913 675 5.32
2.0 Swift #2 38.81 710,750 678 38.78
2.0 C# naot #5 3.25 596,599 679 10.70
2.1 Rust #2 1.38 159,937 707 1.64
2.1 Dart aot #5 8.65 536,773 710 13.90
2.1 Perl #2 17.14 212,640 717 29.56
2.1 Swift 23.39 922,284 721 39.67
2.1 Rust #3 1.38 210,379 726 1.63
2.1 Ruby #3 12.42 217,313 730 24.43
2.2 Racket #2 13.95 1,646,199 736 25.33
2.2 Java naot #6 7.66 392,942 746 21.92
2.2 Go 25.79 301,662 749 61.53
2.2 Swift #4 18.22 1,099,583 751 41.31
2.3 Rust #4 1.38 206,811 771 1.63
2.3 Rust #5 1.35 209,863 777 1.57
2.4 Rust 1.35 159,793 811 1.60
2.4 Go #5 3.23 297,800 817 5.42
2.4 PHP 1.88 203,751 822 3.68
2.4 Go #4 14.49 349,008 832 35.00
2.5 Go #3 25.15 336,585 836 60.64
2.5 C# naot #4 9.81 743,510 854 33.00
2.5 Perl #3 10.40 529,801 857 30.87
2.5 C++g++ #3 12.37 222,614 859 17.94
2.6 Java naot 11.36 280,367 875 20.93
2.8 Java naot #3 7.63 383,447 935 22.01
2.9 Rust #6 1.21 159,846 994 1.46
3.1 Erlang #6 21.26 4,641,796 1055 41.75
3.1 Dart aot #3 9.96 581,030 1061 17.75
3.3 C gcc #2 3.22 106,713 1121 3.21
3.6 C gcc #4 0.97 157,417 1237 3.29
3.7 C gcc #3 1.73 107,401 1273 3.31
3.9 Free Pascal 5.56 106,508 1313 5.54
4.1 C gcc #5 0.81 157,463 1403 2.04
5.5 C# naot #2 1.36 320,512 1881 2.54
5.8 Lisp SBCL #4 13.84 1,089,716 1977 29.65
6.6 Intel Fortran 0.98 189,305 2229 3.07
7.2 Java naot #4 1.38 554,586 2441 3.96
8.4 C++ g++ #6 1.14 285,639 2856 2.26
11 Ada 2012 GNAT #5 5.73 162,357 3647 16.07
Ada 2012 GNAT #6 Bad Output
C++ g++ Empty
C++ g++ #2 Empty
C++ g++ #5 Empty
C++ g++ #4 Empty
F# Bad Output
F# #4 Bad Output
Java naot #2 Empty
Lua Empty
Perl #5 Bad Output
Perl #4 Bad Output
Pharo Smalltalk Empty
 
 
  * possible hand-written vector instructions or "unsafe" or naked ffi
 
× source secs mem gz cpu secs
1.9 * Julia #3 2.18 671,347 630 3.56
1.9 * OCaml #2 14.01 947,642 644 14.01
1.9 * OCaml #3 2.20 469,848 653 3.35
2.3 * Julia #5 1.91 519,856 766 3.18
2.3 * Julia #4 2.00 522,338 772 3.28
4.2 * Python 3 #2 1.41 191,300 1411 2.63
6.5 * Haskell GHC #3 1.11 356,499 2219 2.33
7.2 * Rust #7 0.78 157,442 2464 2.00