The Computer Language
24.11 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 and cpu load). 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 cpu load
1.0 Ruby yjit #9 29.92 216,704 340 29.91 0% 100% 0% 0%
1.0 Matz's Ruby #9 41.08 230,016 340 41.07 100% 0% 0% 0%
1.2 Julia 4.10 606,148 414 4.24 99% 2% 2% 1%
1.3 F# .NET #2 4.72 850,784 437 4.97 70% 0% 2% 33%
1.3 Ruby yjit #2 22.86 216,576 444 22.87 47% 27% 5% 20%
1.3 Matz's Ruby #2 34.55 230,016 444 34.55 100% 0% 0% 0%
1.4 Perl 22.28 205,748 471 22.28 100% 0% 0% 0%
1.4 Node.js #4 5.41 978,952 471 5.56 99% 2% 1% 2%
1.5 Chapel #2 3.54 405,032 498 4.48 98% 9% 10% 9%
1.5 Chapel #3 3.11 404,924 503 4.05 99% 11% 11% 10%
1.5 Dart #4 13.48 472,972 513 13.62 65% 35% 1% 0%
1.5 Python 3 8.91 432,220 515 16.44 80% 27% 43% 35%
1.6 Racket 24.06 1,294,636 548 24.06 0% 100% 0% 0%
1.8 F# .NET #7 4.58 662,224 610 6.41 19% 14% 14% 93%
1.8 F# .NET #6 1.77 767,564 622 5.11 74% 62% 88% 64%
1.9 C# .NET 4.60 599,212 641 4.83 38% 8% 59% 1%
2.0 Dart #2 17.14 515,328 667 17.70 40% 61% 0% 1%
2.0 Node.js #3 4.27 796,080 675 5.30 1% 1% 32% 89%
2.0 Swift #2 38.80 686,136 678 38.80 100% 0% 0% 0%
2.0 C# .NET #5 1.74 614,536 679 5.02 72% 66% 74% 77%
2.1 Rust #2 1.38 153,932 707 1.63 100% 5% 6% 8%
2.1 Dart #5 8.62 521,032 710 13.85 61% 47% 38% 15%
2.1 Perl #2 17.06 205,440 717 29.44 86% 0% 85% 0%
2.1 Swift 23.40 891,792 721 39.65 69% 0% 0% 99%
2.1 Rust #3 1.34 202,952 726 1.59 26% 6% 6% 80%
2.1 Ruby yjit #3 11.84 216,576 730 23.97 39% 95% 34% 33%
2.1 Matz's Ruby #3 16.32 230,016 730 36.32 46% 93% 41% 41%
2.2 Racket #2 14.03 1,552,444 736 25.37 46% 44% 36% 53%
2.2 Java  #6 5.60 1,237,440 746 17.12 86% 66% 73% 80%
2.2 Go 25.37 319,956 749 61.07 63% 62% 55% 60%
2.2 Swift #4 18.30 1,064,768 751 41.36 41% 91% 53% 41%
2.3 Rust #4 1.34 199,684 771 1.58 0% 18% 81% 18%
2.3 Rust #5 1.33 202,800 777 1.57 37% 0% 0% 83%
2.4 Rust 1.34 153,972 811 1.56 82% 6% 23% 8%
2.4 Go #5 3.25 321,360 817 5.43 31% 21% 23% 90%
2.4 PHP 1.87 194,684 822 3.70 46% 34% 43% 74%
2.4 Perl #4 10.21 157,444 823 30.52 62% 92% 48% 95%
2.4 Go #4 14.61 369,008 832 35.91 57% 54% 75% 60%
2.5 Go #3 25.62 371,204 836 61.79 74% 72% 47% 47%
2.5 C# .NET #4 8.65 854,996 854 29.97 77% 94% 81% 94%
2.5 Perl #3 10.36 410,236 857 30.81 58% 52% 92% 95%
2.5 C++ g++ #3 12.38 215,640 859 17.95 30% 1% 45% 70%
2.6 Java 8.47 575,552 875 16.69 67% 46% 44% 40%
2.8 Java #3 5.25 611,476 935 17.25 81% 84% 84% 80%
2.9 Rust #6 1.17 153,780 994 1.42 7% 7% 7% 100%
3.1 Erlang #6 21.80 4,651,256 1055 41.89 59% 46% 54% 31%
3.1 Dart #3 9.96 563,160 1061 17.39 95% 22% 29% 27%
3.3 C gcc #2 3.21 103,288 1121 3.21 100% 0% 0% 0%
3.6 C gcc #4 0.97 152,264 1237 3.28 80% 100% 72% 87%
3.7 C gcc #3 1.72 103,736 1273 3.31 83% 43% 28% 38%
3.9 Free Pascal 5.52 103,016 1313 5.52 100% 0% 0% 0%
4.1 C gcc #5 0.81 152,500 1403 2.03 52% 100% 47% 55%
5.5 C# .NET #2 1.36 402,516 1881 2.60 85% 33% 19% 57%
5.8 Lisp SBCL #4 14.02 1,214,164 1977 29.73 47% 54% 45% 66%
6.5 Java #2 1.55 372,764 2201 3.16 38% 32% 37% 98%
6.6 Intel Fortran 0.96 179,724 2229 3.09 78% 77% 75% 96%
8.4 C++ g++ #6 1.15 276,336 2856 2.24 92% 40% 33% 34%
11 Ada 2012 GNAT #5 5.86 155,548 3647 16.14 78% 61% 78% 58%
Ada 2012 GNAT #6 Bad Output
C++ g++ Make Error
C++ g++ #2 Make Error
C++ g++ #5 Make Error
C++ g++ #4 Make Error
F# .NET Bad Output
F# .NET #4 Bad Output
Lua Failed
Perl #5 Bad Output
 
 
  * possible hand-written vector instructions | "unsafe" | naked ffi
 
× source secs mem gz cpu secs cpu load
1.9 * Julia #3 2.07 578,576 630 3.51 7% 1% 71% 91%
1.9 * OCaml #2 13.99 922,636 644 13.99 0% 0% 0% 100%
1.9 * OCaml #3 2.20 451,620 653 3.35 0% 100% 1% 52%
2.3 * Julia #5 1.80 431,004 766 3.12 5% 70% 99% 1%
2.3 * Julia #4 1.89 433,140 772 3.22 98% 2% 6% 64%
4.2 * Python 3 #2 1.35 168,236 1411 2.64 43% 31% 37% 87%
6.5 * Haskell GHC #3 1.10 414,592 2219 2.32 53% 39% 75% 44%
7.2 * Rust #7 0.78 148,924 2464 2.00 47% 55% 64% 89%