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.72 307,968 2213 3.77 78% 40% 61% 40%
1.2 Fortran Intel 1.77 173,036 2225 4.91 59% 62% 59% 97%
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.12 153,184 986 3.15 15% 33% 85% 15%
1.5 C# .NET Core #8 2.17 267,768 1869 4.26 36% 30% 84% 46%
1.5 Rust #5 2.24 198,160 771 3.27 59% 1% 1% 84%
1.6 Rust #4 2.30 201,404 765 3.34 18% 1% 44% 83%
1.6 Rust #3 2.32 200,076 719 3.34 32% 14% 15% 83%
1.6 C gcc #3 2.38 103,516 1266 4.21 23% 23% 37% 93%
1.7 Rust 2.41 144,612 804 3.28 25% 13% 87% 11%
1.7 Rust #2 2.45 150,912 701 3.33 12% 100% 12% 12%
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.83 350,944 408 6.23 99% 3% 2% 2%
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.9 Dart snapshot #3 8.56 873,948 1041 12.16 18% 27% 78% 19%
6.2 Chapel 9.03 581,404 477 17.99 99% 17% 13% 70%
6.2 Dart #3 9.06 918,472 1041 12.94 66% 24% 21% 32%
6.5 C++ g++ 9.44 197,524 656 9.49 0% 0% 100% 0%
7.0 Java  #6 10.25 634,884 740 30.23 68% 95% 67% 65%
7.2 Node js #3 10.44 787,312 668 12.48 27% 17% 73% 3%
7.3 Java #3 10.68 646,800 929 31.96 72% 71% 71% 85%
7.5 Node js 10.86 609,236 408 11.46 22% 19% 2% 62%
8.0 Dart snapshot #2 11.66 513,560 677 13.24 6% 3% 95% 10%
8.0 Node js #2 11.71 569,804 432 12.32 47% 11% 7% 41%
8.1 TypeScript 11.74 564,284 440 12.44 35% 3% 14% 54%
8.1 TypeScript #2 11.78 553,164 440 12.40 73% 5% 6% 22%
8.1 Dart #2 11.82 556,848 677 13.94 81% 8% 9% 20%
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%
12 Java 16.81 642,780 868 31.30 30% 79% 33% 45%
12 F# .NET Core #6 17.16 1,341,200 611 54.97 78% 78% 75% 89%
12 Java OpenJ9 #6 17.40 979,972 740 44.81 66% 77% 59% 56%
12 C# .NET Core #5 17.66 1,353,328 673 57.01 88% 80% 77% 78%
12 Java OpenJ9 #3 17.79 883,256 929 46.69 55% 55% 91% 61%
13 Python 3 18.39 453,960 512 36.53 35% 39% 32% 93%
13 F# .NET Core #5 18.49 1,147,028 529 54.65 63% 82% 74% 77%
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 Java OpenJ9 25.45 862,496 868 45.73 29% 39% 34% 77%
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.64 438,516 802 62.79 58% 57% 53% 44%
21 Ruby #2 29.95 366,408 431 56.77 48% 58% 35% 48%
21 C# .NET Core #4 30.00 1,553,280 856 101.81 77% 79% 88% 95%
21 C# .NET Core #9 30.90 1,332,620 659 105.96 85% 84% 88% 85%
22 Go #4 31.65 488,508 829 74.67 46% 67% 55% 68%
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%
30 Racket CS 43.57 1,270,764 541 49.69 6% 8% 94% 5%
30 Go 43.74 481,684 741 103.04 70% 50% 63% 52%
31 Go #3 44.72 496,372 829 109.12 66% 67% 63% 48%
31 Swift 45.10 882,596 715 79.79 14% 79% 84% 0%
37 C# .NET Core 54.01 1,041,984 635 55.11 9% 51% 7% 35%
37 F# .NET Core #2 54.15 1,294,532 426 55.53 52% 2% 1% 47%
38 Racket 55.75 1,311,368 541 56.23 0% 0% 0% 100%
53 Swift #2 77.75 682,772 671 78.46 0% 0% 0% 100%
83 Dart aot #3 121.49 797,980 1041 135.75 4% 6% 4% 98%
87 Dart aot #2 126.41 525,068 677 129.34 1% 42% 59% 1%
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 Make Error
Haskell GHC Make Error
Java #4 Bad Output
Java #5 Bad Output
Java #2 Bad Output
Java OpenJ9 #2 Bad Output
Java OpenJ9 #4 Bad Output
Java OpenJ9 #5 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
TypeScript #3 Failed
Swift #3 Bad Output