The Computer Language
Benchmarks Game

regex-redux

We accept something intermediate between chaos and rigidity — enough flex & slop & play to allow for Haskell programs that are not just mechanically translated from Fortran; enough similarity in the basic workloads & tested results.

Programming language advocates and curious programmers have contributed new programs and introduced newer techniques. Look at the slower simple sequential programs, and  look at the parallel programs written for multicore, and  look at the low-level programs written for SIMD. Always look at the source code.

× source secs mem gz busy cpu load
1.0 C gcc #5 1.46 152,236 1397 3.43 43% 100% 45% 48%
1.0 C gcc #4 1.49 152,416 1230 4.09 61% 59% 54% 100%
1.2 Haskell GHC #3 1.73 308,544 2213 3.98 64% 76% 45% 45%
1.3 C++ g++ #4 1.82 203,760 1315 4.43 44% 51% 48% 100%
1.4 C++ g++ #6 1.98 275,540 2850 3.75 84% 45% 30% 31%
1.5 Rust #6 2.16 153,232 986 3.17 84% 16% 17% 29%
1.5 C# .NET Core #8 2.24 295,716 1869 4.29 27% 50% 44% 70%
1.6 Rust #5 2.35 202,272 771 3.31 85% 0% 56% 1%
1.6 C gcc #3 2.38 103,516 1266 4.21 23% 23% 37% 93%
1.7 Rust #4 2.41 197,904 765 4.26 41% 41% 83% 11%
1.7 Rust #3 2.42 198,236 719 3.43 14% 14% 84% 30%
1.7 Rust 2.49 151,732 804 3.35 12% 25% 86% 12%
1.8 Rust #2 2.56 152,448 701 3.45 11% 11% 13% 100%
1.9 PHP 2.80 158,000 816 5.48 23% 37% 43% 93%
2.7 Free Pascal #2 3.88 103,124 1503 5.35 15% 15% 93% 14%
2.8 C gcc #2 4.14 103,136 1115 4.21 1% 0% 0% 100%
4.0 Julia 5.82 349,720 408 6.29 3% 3% 3% 99%
4.4 C++ g++ #2 6.36 192,460 700 9.61 84% 55% 1% 11%
4.5 C++ g++ #5 6.48 215,416 852 9.31 88% 15% 15% 26%
4.8 Ada 2012 GNAT #5 6.97 154,328 3640 19.90 59% 70% 74% 83%
5.2 Free Pascal 7.58 99,900 1273 7.68 1% 100% 1% 0%
5.5 Dart snapshot #3 7.98 867,736 1041 12.26 19% 19% 20% 96%
5.7 Dart #3 8.33 916,268 1041 13.60 24% 31% 87% 21%
6.0 Chapel 8.80 629,668 477 17.30 99% 13% 13% 71%
6.5 C++ g++ 9.44 197,524 656 9.49 0% 0% 100% 0%
6.9 Node js #3 9.98 819,516 668 12.17 8% 17% 42% 55%
7.2 Java  #6 10.48 645,680 740 31.62 72% 87% 74% 68%
7.4 Node js 10.73 608,876 408 11.31 11% 6% 2% 86%
7.6 Java #3 11.04 674,336 929 32.65 67% 72% 73% 85%
7.9 Node js #2 11.49 556,372 432 12.29 37% 11% 50% 10%
7.9 Dart snapshot #2 11.54 512,312 677 13.39 56% 12% 45% 3%
8.0 TypeScript #2 11.57 568,772 440 12.56 30% 35% 19% 26%
8.0 TypeScript 11.64 568,996 440 12.34 44% 5% 4% 53%
8.2 Dart #2 11.95 555,732 677 13.78 4% 10% 9% 93%
9.7 F# .NET Core #6 14.10 1,497,456 611 46.88 82% 73% 81% 96%
10 C# .NET Core #5 14.76 1,502,600 673 48.65 76% 80% 80% 94%
10 Perl #4 14.95 155,844 820 44.17 87% 51% 96% 62%
10 Perl #3 15.25 156,608 854 44.96 82% 63% 64% 86%
11 F# .NET Core #5 15.79 1,436,032 529 46.79 60% 79% 75% 82%
11 Java 16.21 644,644 868 29.76 53% 37% 39% 54%
12 Python 3 17.64 444,704 512 32.85 51% 80% 27% 28%
13 C++ g++ #3 19.00 215,736 853 28.05 47% 1% 95% 5%
15 Ruby #3 21.68 268,116 751 68.01 94% 86% 70% 63%
17 OCaml #2 24.81 969,076 637 25.15 0% 1% 0% 100%
17 Substrate VM #3 24.95 1,351,092 929 51.17 43% 31% 99% 32%
18 Perl #2 25.47 204,636 710 43.93 1% 100% 0% 71%
18 Racket #2 26.48 1,249,264 729 57.98 73% 61% 3% 82%
19 Racket CS #2 28.32 1,454,812 729 46.99 1% 37% 30% 98%
20 JRuby #2 28.38 1,393,556 431 65.26 45% 50% 91% 44%
20 Go #2 29.20 399,668 802 61.29 71% 55% 37% 47%
20 Substrate VM 29.55 1,011,488 868 47.98 20% 100% 21% 21%
21 Ruby #2 29.95 366,408 431 56.77 48% 58% 35% 48%
21 Go #4 30.48 398,536 829 73.19 54% 70% 50% 66%
21 C# .NET Core #4 30.74 1,722,288 856 105.85 91% 81% 98% 75%
22 C# .NET Core #9 32.08 1,578,224 659 106.55 71% 78% 92% 91%
24 Perl 35.21 204,692 464 35.42 0% 0% 0% 100%
26 Erlang HiPE #6 38.15 3,325,836 1048 67.10 42% 26% 67% 41%
26 Ruby #9 38.20 317,424 335 71.96 5% 36% 47% 100%
29 Swift 41.68 880,268 715 73.43 83% 1% 66% 27%
30 Racket CS 43.57 1,270,764 541 49.69 6% 8% 94% 5%
31 Go #3 45.00 461,508 829 109.85 47% 99% 49% 49%
32 C# .NET Core 45.90 1,441,840 635 46.99 13% 0% 1% 88%
32 Go 46.22 406,356 741 108.86 76% 47% 62% 50%
32 F# .NET Core #2 46.29 1,435,816 426 47.05 3% 14% 84% 0%
36 Haskell GHC 52.35 1,670,744 663 159.70 76% 75% 70% 84%
38 Racket 55.75 1,311,368 541 56.23 0% 0% 0% 100%
49 Swift #2 71.68 683,480 671 72.48 1% 1% 100% 0%
81 Dart aot #3 117.76 790,244 1041 132.09 46% 4% 6% 56%
88 Dart aot #2 127.99 522,272 677 130.33 1% 29% 71% 1%
118 Truffle Ruby #3 171.76 1,257,096 751 268.85 21% 48% 63% 24%
119 Truffle Ruby #2 173.38 1,477,688 431 275.05 54% 22% 21% 62%
133 Truffle Ruby #9 194.23 1,476,572 335 272.69 46% 27% 19% 49%
Ada 2012 GNAT #6 Bad Output
C# .NET Core #6 Bad Output
C# .NET Core #2 Bad Output
C# .NET Core #7 Bad Output
C# .NET Core #3 Bad Output
F# .NET Core #4 Bad Output
F# .NET Core #3 Bad Output
F# .NET Core Bad Output
Haskell GHC #2 Bad Output
Java #4 Bad Output
Java #5 Bad Output
Java #2 Bad Output
Substrate VM #5 Bad Output
Substrate VM #6 Make Error
Substrate VM #2 Bad Output
Substrate VM #4 Bad Output
Lisp SBCL #3 Failed
Lua #2 Bad Output
OCaml #4 Make Error
Pharo Smalltalk Failed
PHP #4 Bad Output
Ruby #8 Bad Output
Ruby #6 Bad Output
Matz's Ruby #2 Bad Output
Matz's Ruby #6 Failed
Matz's Ruby #9 Bad Output
Matz's Ruby #8 Failed
Matz's Ruby #3 Failed
Truffle Ruby #8 Failed
Truffle Ruby #6 Bad Output
TypeScript #3 Failed
Swift #3 Bad Output