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 Rust #6 1.18 154,096 994 1.44 7% 81% 28% 7%
1.1 Rust 1.33 153,792 811 1.58 7% 7% 100% 6%
1.1 Rust #5 1.34 203,224 777 1.58 0% 82% 0% 35%
1.1 Rust #2 1.34 153,776 707 1.60 8% 6% 100% 6%
1.1 Rust #4 1.35 199,548 771 1.61 1% 19% 80% 19%
1.1 Rust #3 1.36 202,908 726 1.61 6% 26% 80% 6%
1.4 C gcc #5 0.81 152,392 1403 2.03 55% 100% 46% 52%
1.5 C++ g++ #6 1.18 276,148 2856 2.23 30% 31% 100% 30%
2.2 Intel Fortran 0.96 179,724 2229 3.09 78% 77% 75% 96%
2.2 C gcc #2 3.21 103,296 1121 3.21 0% 0% 1% 100%
2.2 Java  #8 1.60 372,628 2201 3.22 54% 40% 33% 75%
2.3 C gcc #4 0.95 152,248 1237 3.27 75% 88% 100% 82%
2.3 C gcc #3 1.73 103,680 1273 3.31 99% 27% 28% 37%
2.5 C++ g++ 3.56 212,180 662 3.56 0% 100% 0% 0%
2.5 C++ g++ #2 2.86 212,648 706 3.62 83% 43% 0% 0%
2.6 PHP 1.85 194,856 822 3.72 40% 82% 42% 35%
2.8 Chapel #3 3.03 404,608 503 3.96 99% 10% 11% 10%
3.1 Chapel #2 3.53 404,608 498 4.47 99% 9% 11% 9%
3.2 C++ g++ #5 3.81 215,648 859 4.53 99% 6% 6% 7%
3.4 C# .NET 4.60 847,380 641 4.84 29% 72% 0% 5%
3.4 Julia 4.40 607,260 414 4.85 95% 8% 6% 0%
3.4 F# .NET #2 4.64 852,224 437 4.89 0% 72% 26% 8%
3.7 Node.js #3 4.31 799,680 675 5.34 1% 90% 32% 1%
3.8 Go #5 3.25 321,360 817 5.43 31% 21% 23% 90%
3.8 F# .NET #6 1.86 860,664 622 5.47 67% 65% 66% 96%
3.8 Free Pascal 5.52 103,016 1313 5.52 100% 0% 0% 0%
4.0 Node.js #4 5.54 966,596 471 5.68 41% 11% 51% 1%
4.4 C# .NET #5 2.11 860,544 679 6.32 80% 79% 67% 74%
4.5 F# .NET #7 4.63 1,398,348 610 6.51 14% 29% 15% 84%
9.5 Dart #4 13.49 472,524 513 13.64 1% 99% 0% 1%
9.8 Dart #5 8.79 583,460 710 14.03 44% 61% 1% 53%
11 Python 3 8.91 432,220 515 16.44 80% 27% 43% 35%
12 Java 8.47 575,552 875 16.69 67% 46% 44% 40%
12 Java #6 5.60 1,237,440 746 17.12 86% 66% 73% 80%
12 Ada 2012 GNAT #5 6.68 155,584 3647 17.13 58% 58% 74% 65%
12 Java #3 5.25 611,476 935 17.25 81% 84% 84% 80%
12 Dart #2 16.98 507,388 667 17.53 99% 1% 2% 0%
12 Dart #3 9.94 572,620 1061 17.73 90% 26% 37% 26%
13 C++ g++ #3 12.46 215,472 859 18.08 0% 5% 95% 45%
16 Perl 22.28 205,748 471 22.28 100% 0% 0% 0%
16 Ruby yjit #2 22.86 216,576 444 22.87 47% 27% 5% 20%
17 Ruby yjit #3 11.84 216,576 730 23.97 39% 95% 34% 33%
17 Racket 24.06 1,294,636 548 24.06 0% 100% 0% 0%
18 Racket #2 14.03 1,552,444 736 25.37 46% 44% 36% 53%
20 Perl #2 17.06 205,440 717 29.44 86% 0% 85% 0%
21 Lisp SBCL #4 14.02 1,214,164 1977 29.73 47% 54% 45% 66%
21 Ruby yjit #9 29.92 216,704 340 29.91 0% 100% 0% 0%
21 Perl #4 10.21 157,444 823 30.52 62% 92% 48% 95%
21 Perl #3 10.36 410,236 857 30.81 58% 52% 92% 95%
24 Matz's Ruby #2 34.55 230,016 444 34.55 100% 0% 0% 0%
25 Go #4 14.61 369,008 832 35.91 57% 54% 75% 60%
25 Matz's Ruby #3 16.32 230,016 730 36.32 46% 93% 41% 41%
27 Swift #2 38.80 686,136 678 38.80 100% 0% 0% 0%
28 Swift 23.40 891,792 721 39.65 69% 0% 0% 99%
29 Matz's Ruby #9 41.08 230,016 340 41.07 100% 0% 0% 0%
29 Swift #4 18.30 1,064,768 751 41.36 41% 91% 53% 41%
29 Erlang #6 21.80 4,651,256 1055 41.89 59% 46% 54% 31%
31 C# .NET #4 13.15 960,820 854 44.64 93% 95% 69% 83%
43 Go 25.37 319,956 749 61.07 63% 62% 55% 60%
43 Go #3 25.62 371,204 836 61.79 74% 72% 47% 47%
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.4 Rust #7 0.78 149,888 2464 1.99 52% 54% 60% 92%
1.6 Haskell GHC #3 1.10 414,592 2219 2.32 53% 39% 75% 44%
1.8 Python 3 #2 1.35 168,236 1411 2.64 43% 31% 37% 87%
1.9 C# .NET #8 1.43 389,120 1881 2.67 36% 29% 84% 39%
2.2 Julia #5 1.79 452,988 766 3.11 66% 98% 9% 1%
2.2 Julia #4 1.88 454,864 772 3.21 66% 11% 1% 93%
2.3 OCaml #3 2.20 451,620 653 3.35 0% 100% 1% 52%
2.4 Julia #3 2.07 581,640 630 3.51 3% 1% 75% 92%
9.7 OCaml #2 13.99 922,636 644 13.99 0% 0% 0% 100%