The Computer Language
24.09 Benchmarks Game

regex-redux

(See rebar.)

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

First a few simple programs.

Then optimisations, multicore parallelism, [pdf] vector parallelism.

Last hand-written vector instructions and "unsafe" programs and the more obvious foreign function interface programs.

  source secs mem gz    
  C++ g++ 3.56 212,180 662    
  Julia 3.91 493,276 414    
  Node.js #4 5.54 966,596 471    
  Ruby yjit #9 29.92 216,704 340    
 
 
 
× source secs mem gz cpu secs cpu load
1.0 C gcc #5 0.81 152,392 1403 2.03 55% 100% 46% 52%
1.2 C gcc #4 0.95 152,248 1237 3.27 75% 88% 100% 82%
1.5 C++ g++ #6 1.18 276,148 2856 2.23 30% 31% 100% 30%
1.5 Rust #6 1.18 154,096 994 1.44 7% 81% 28% 7%
1.6 Rust 1.33 153,792 811 1.58 7% 7% 100% 6%
1.7 Rust #5 1.34 203,224 777 1.58 0% 82% 0% 35%
1.7 Rust #2 1.34 153,776 707 1.60 8% 6% 100% 6%
1.7 Rust #4 1.35 199,548 771 1.61 1% 19% 80% 19%
1.7 Rust #3 1.36 202,908 726 1.61 6% 26% 80% 6%
2.0 Java  #8 1.62 372,312 2201 3.20 51% 34% 34% 79%
2.1 C gcc #3 1.73 103,680 1273 3.31 99% 27% 28% 37%
2.3 PHP 1.85 194,856 822 3.72 40% 82% 42% 35%
2.3 F# .NET #6 1.86 860,664 622 5.47 67% 65% 66% 96%
2.6 C# .NET #5 2.11 860,544 679 6.32 80% 79% 67% 74%
3.5 C++ g++ #2 2.86 212,648 706 3.62 83% 43% 0% 0%
3.8 Chapel #3 3.08 405,120 503 4.02 99% 10% 11% 10%
4.0 C gcc #2 3.21 103,296 1121 3.21 0% 0% 1% 100%
4.0 Go #5 3.25 321,360 817 5.43 31% 21% 23% 90%
4.4 C++ g++ 3.56 212,180 662 3.56 0% 100% 0% 0%
4.4 Chapel #2 3.58 404,480 498 4.51 99% 9% 10% 8%
4.7 C++ g++ #5 3.81 215,648 859 4.53 99% 6% 6% 7%
4.8 Julia 3.91 493,276 414 4.11 3% 3% 0% 100%
5.3 Node.js #3 4.31 799,680 675 5.34 1% 90% 32% 1%
5.7 C# .NET 4.60 847,380 641 4.84 29% 72% 0% 5%
5.7 F# .NET #7 4.63 1,398,348 610 6.51 14% 29% 15% 84%
5.7 F# .NET #2 4.64 852,224 437 4.89 0% 72% 26% 8%
6.5 Java #3 5.25 629,428 935 17.37 87% 79% 80% 86%
6.8 Free Pascal 5.52 103,016 1313 5.52 100% 0% 0% 0%
6.9 Node.js #4 5.54 966,596 471 5.68 41% 11% 51% 1%
6.9 Java #6 5.59 1,235,356 746 17.14 69% 88% 78% 71%
8.3 Ada 2012 GNAT #5 6.68 155,584 3647 17.13 58% 58% 74% 65%
11 Java 8.58 586,528 875 16.95 42% 49% 55% 54%
11 Dart #5 8.79 583,460 710 14.03 44% 61% 1% 53%
11 Python 3 8.84 432,748 515 16.23 51% 26% 74% 32%
12 Dart #3 9.94 572,620 1061 17.73 90% 26% 37% 26%
13 Perl #4 10.21 157,444 823 30.52 62% 92% 48% 95%
13 Perl #3 10.36 410,236 857 30.81 58% 52% 92% 95%
15 Ruby yjit #3 11.84 216,576 730 23.97 39% 95% 34% 33%
15 C++ g++ #3 12.46 215,472 859 18.08 0% 5% 95% 45%
16 C# .NET #4 13.15 960,820 854 44.64 93% 95% 69% 83%
17 Dart #4 13.49 472,524 513 13.64 1% 99% 0% 1%
17 Lisp SBCL #4 14.02 1,214,164 1977 29.73 47% 54% 45% 66%
17 Racket #2 14.03 1,552,444 736 25.37 46% 44% 36% 53%
18 Go #4 14.61 369,008 832 35.91 57% 54% 75% 60%
20 Matz's Ruby #3 16.32 230,016 730 36.32 46% 93% 41% 41%
21 Dart #2 16.98 507,388 667 17.53 99% 1% 2% 0%
21 Perl #2 17.06 205,440 717 29.44 86% 0% 85% 0%
23 Swift #4 18.30 1,064,768 751 41.36 41% 91% 53% 41%
27 Erlang #6 21.80 4,651,256 1055 41.89 59% 46% 54% 31%
28 Perl 22.28 205,748 471 22.28 100% 0% 0% 0%
28 Ruby yjit #2 22.86 216,576 444 22.87 47% 27% 5% 20%
29 Swift 23.40 891,792 721 39.65 69% 0% 0% 99%
30 Racket 24.06 1,294,636 548 24.06 0% 100% 0% 0%
31 Go 25.37 319,956 749 61.07 63% 62% 55% 60%
32 Go #3 25.62 371,204 836 61.79 74% 72% 47% 47%
37 Ruby yjit #9 29.92 216,704 340 29.91 0% 100% 0% 0%
43 Matz's Ruby #2 34.55 230,016 444 34.55 100% 0% 0% 0%
48 Swift #2 38.80 686,136 678 38.80 100% 0% 0% 0%
51 Matz's Ruby #9 41.08 230,016 340 41.07 100% 0% 0% 0%
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.0 Rust #7 0.78 149,888 2464 1.99 52% 54% 60% 92%
1.2 Classic Fortran 0.95 180,044 2229 3.12 76% 78% 96% 81%
1.4 Haskell GHC #3 1.10 414,592 2219 2.32 53% 39% 75% 44%
1.7 Python 3 #2 1.35 168,036 1411 2.63 85% 34% 44% 31%
1.8 C# .NET #8 1.43 389,120 1881 2.67 36% 29% 84% 39%
2.2 Julia #5 1.78 448,196 766 3.11 71% 98% 1% 6%
2.3 Julia #4 1.83 453,000 772 3.18 1% 100% 4% 68%
2.7 OCaml #3 2.20 451,620 653 3.35 0% 100% 1% 52%
2.8 Julia #3 2.26 488,172 630 3.79 63% 6% 100% 0%
17 OCaml #2 13.99 922,636 644 13.99 0% 0% 0% 100%