The Computer Language
24.09 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 Matz's Ruby #9 41.08 230,016 340 41.07 100% 0% 0% 0%
1.0 Ruby yjit #9 29.92 216,704 340 29.91 0% 100% 0% 0%
1.2 Julia 4.40 607,260 414 4.85 95% 8% 6% 0%
1.3 F# .NET #2 4.64 852,224 437 4.89 0% 72% 26% 8%
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 Node.js #4 5.54 966,596 471 5.68 41% 11% 51% 1%
1.4 Perl 22.28 205,748 471 22.28 100% 0% 0% 0%
1.5 Chapel #2 3.53 404,608 498 4.47 99% 9% 11% 9%
1.5 Chapel #3 3.03 404,608 503 3.96 99% 10% 11% 10%
1.5 Dart #4 13.49 472,524 513 13.64 1% 99% 0% 1%
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.63 1,398,348 610 6.51 14% 29% 15% 84%
1.8 F# .NET #6 1.86 860,664 622 5.47 67% 65% 66% 96%
1.9 C# .NET 4.60 847,380 641 4.84 29% 72% 0% 5%
1.9 C++ g++ 3.56 212,180 662 3.56 0% 100% 0% 0%
2.0 Dart #2 16.98 507,388 667 17.53 99% 1% 2% 0%
2.0 Node.js #3 4.31 799,680 675 5.34 1% 90% 32% 1%
2.0 Swift #2 38.80 686,136 678 38.80 100% 0% 0% 0%
2.0 C# .NET #5 2.11 860,544 679 6.32 80% 79% 67% 74%
2.1 C++ g++ #2 2.86 212,648 706 3.62 83% 43% 0% 0%
2.1 Rust #2 1.34 153,776 707 1.60 8% 6% 100% 6%
2.1 Dart #5 8.79 583,460 710 14.03 44% 61% 1% 53%
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.36 202,908 726 1.61 6% 26% 80% 6%
2.1 Matz's Ruby #3 16.32 230,016 730 36.32 46% 93% 41% 41%
2.1 Ruby yjit #3 11.84 216,576 730 23.97 39% 95% 34% 33%
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.35 199,548 771 1.61 1% 19% 80% 19%
2.3 Rust #5 1.34 203,224 777 1.58 0% 82% 0% 35%
2.4 Rust 1.33 153,792 811 1.58 7% 7% 100% 6%
2.4 Go #5 3.25 321,360 817 5.43 31% 21% 23% 90%
2.4 PHP 1.85 194,856 822 3.72 40% 82% 42% 35%
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 13.15 960,820 854 44.64 93% 95% 69% 83%
2.5 Perl #3 10.36 410,236 857 30.81 58% 52% 92% 95%
2.5 C++ g++ #5 3.81 215,648 859 4.53 99% 6% 6% 7%
2.5 C++ g++ #3 12.46 215,472 859 18.08 0% 5% 95% 45%
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.18 154,096 994 1.44 7% 81% 28% 7%
3.1 Erlang #6 21.80 4,651,256 1055 41.89 59% 46% 54% 31%
3.1 Dart #3 9.94 572,620 1061 17.73 90% 26% 37% 26%
3.3 C gcc #2 3.21 103,296 1121 3.21 0% 0% 1% 100%
3.6 C gcc #4 0.95 152,248 1237 3.27 75% 88% 100% 82%
3.7 C gcc #3 1.73 103,680 1273 3.31 99% 27% 28% 37%
3.9 Free Pascal 5.52 103,016 1313 5.52 100% 0% 0% 0%
4.1 C gcc #5 0.81 152,392 1403 2.03 55% 100% 46% 52%
5.8 Lisp SBCL #4 14.02 1,214,164 1977 29.73 47% 54% 45% 66%
6.5 Java #8 1.60 372,628 2201 3.22 54% 40% 33% 75%
6.6 Intel Fortran 0.96 179,724 2229 3.09 78% 77% 75% 96%
8.4 C++ g++ #6 1.18 276,148 2856 2.23 30% 31% 100% 30%
11 Ada 2012 GNAT #5 6.68 155,584 3647 17.13 58% 58% 74% 65%
Ada 2012 GNAT #6 Bad Output
C++ g++ #4 Make Error
F# .NET Bad Output
F# .NET #4 Bad Output
Lua Failed
Perl #5 Bad Output
 
 
  hand-written vector instructions | "unsafe" | naked ffi
 
× source secs mem gz cpu secs cpu load
1.9 Julia #3 2.07 581,640 630 3.51 3% 1% 75% 92%
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.79 452,988 766 3.11 66% 98% 9% 1%
2.3 Julia #4 1.88 454,864 772 3.21 66% 11% 1% 93%
4.2 Python 3 #2 1.35 168,236 1411 2.64 43% 31% 37% 87%
5.5 C# .NET #8 1.43 389,120 1881 2.67 36% 29% 84% 39%
6.5 Haskell GHC #3 1.10 414,592 2219 2.32 53% 39% 75% 44%
7.2 Rust #7 0.78 149,888 2464 1.99 52% 54% 60% 92%