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.48 152,188 1397 3.44 46% 45% 100% 41%
1.0 C gcc #4 1.51 152,388 1230 4.09 100% 53% 59% 59%
1.2 Haskell GHC #3 1.78 307,992 2213 4.35 79% 50% 50% 65%
1.2 C++ g++ #4 1.83 203,932 1315 4.44 44% 99% 48% 51%
1.4 C++ g++ #6 2.02 275,844 2850 3.71 28% 85% 28% 44%
1.4 Rust #6 2.10 153,076 986 3.14 30% 17% 83% 19%
1.5 C# .NET Core #8 2.17 267,768 1869 4.26 36% 30% 84% 46%
1.5 C# aot #8 2.20 309,740 1869 4.54 53% 22% 47% 85%
1.5 Rust #5 2.28 199,824 771 3.29 1% 85% 58% 0%
1.6 Rust #4 2.33 200,440 765 3.37 44% 25% 59% 17%
1.6 Rust #3 2.34 199,756 719 3.48 14% 83% 19% 32%
1.6 Rust 2.36 149,080 804 3.33 15% 14% 100% 13%
1.6 C gcc #3 2.38 103,564 1266 4.19 90% 23% 32% 31%
1.7 Rust #2 2.47 153,216 701 3.41 13% 28% 84% 13%
1.9 PHP 2.87 156,560 816 5.50 45% 34% 35% 78%
2.6 Free Pascal #2 3.88 103,124 1503 5.35 15% 15% 93% 14%
2.8 C gcc #2 4.14 103,116 1115 4.16 73% 27% 0% 0%
4.0 Julia 5.91 469,380 408 6.32 3% 2% 99% 3%
4.0 C++ g++ #2 5.96 206,312 700 9.24 73% 16% 54% 12%
4.4 C++ g++ #5 6.51 213,780 852 10.00 14% 28% 21% 90%
4.6 Go #5 6.84 340,376 810 9.43 30% 43% 13% 52%
4.7 Ada 2012 GNAT #5 6.86 154,376 3640 19.60 60% 58% 83% 84%
5.1 Free Pascal 7.58 99,900 1273 7.68 1% 100% 1% 0%
5.4 F# .NET Core #7 8.03 1,069,132 599 11.16 53% 37% 32% 16%
6.3 C++ g++ 9.36 198,288 656 9.44 1% 100% 0% 0%
6.4 Chapel 9.37 554,260 477 18.22 99% 13% 13% 70%
6.6 Dart snapshot #3 9.80 875,492 1041 12.90 69% 23% 17% 23%
6.9 Dart #3 10.13 918,652 1041 13.35 45% 20% 18% 49%
7.0 Java  #6 10.31 644,560 740 31.47 72% 72% 92% 70%
7.1 Node js #3 10.44 787,312 668 12.48 27% 17% 73% 3%
7.1 Java #3 10.54 647,464 929 32.49 79% 77% 73% 79%
7.4 Node js 10.86 609,236 408 11.46 22% 19% 2% 62%
7.8 Dart snapshot #2 11.54 513,828 677 13.35 19% 86% 8% 3%
7.9 Node js #2 11.71 569,804 432 12.32 47% 11% 7% 41%
8.0 TypeScript 11.74 564,284 440 12.44 35% 3% 14% 54%
8.0 TypeScript #2 11.78 553,164 440 12.40 73% 5% 6% 22%
8.1 Dart #2 11.95 554,136 677 14.02 61% 7% 27% 23%
11 Perl #4 16.39 157,044 820 46.71 81% 60% 85% 59%
11 Java 16.51 634,684 868 31.02 54% 26% 46% 61%
11 Perl #3 16.54 157,220 854 47.46 63% 85% 78% 60%
12 F# .NET Core #6 17.16 1,341,200 611 54.97 78% 78% 75% 89%
12 Java OpenJ9 #6 17.42 858,904 740 44.57 70% 64% 65% 57%
12 C# .NET Core #5 17.66 1,353,328 673 57.01 88% 80% 77% 78%
12 C# aot #5 17.73 1,272,296 673 56.76 81% 84% 76% 80%
12 Java OpenJ9 #3 17.84 1,004,808 929 45.94 65% 61% 51% 80%
12 C++ g++ #3 18.11 217,276 853 27.22 23% 26% 100% 1%
13 Python 3 18.45 457,340 512 37.52 69% 37% 50% 48%
13 F# .NET Core #5 18.49 1,147,028 529 54.65 63% 82% 74% 77%
15 Ruby #3 21.68 268,116 751 68.01 94% 86% 70% 63%
17 OCaml #2 25.43 969,092 637 25.60 100% 0% 0% 0%
17 Java OpenJ9 25.62 851,232 868 45.24 44% 38% 25% 69%
18 Racket #2 26.15 1,244,012 729 56.28 50% 69% 41% 56%
19 Perl #2 27.33 205,064 710 47.17 71% 100% 2% 0%
19 Racket CS #2 27.37 1,344,328 729 45.84 30% 73% 27% 37%
20 JRuby #2 29.08 1,394,004 431 65.84 44% 58% 81% 43%
20 C# aot #4 29.39 1,495,336 856 100.40 77% 97% 80% 88%
20 Go #2 29.82 428,224 802 62.65 48% 45% 52% 65%
20 Ruby #2 29.95 366,408 431 56.77 48% 58% 35% 48%
20 C# .NET Core #4 30.00 1,553,280 856 101.81 77% 79% 88% 95%
21 C# aot #9 30.79 1,290,404 659 102.19 80% 80% 78% 94%
21 C# .NET Core #9 30.90 1,332,620 659 105.96 85% 84% 88% 85%
22 Go #4 31.72 478,084 829 74.53 69% 49% 58% 58%
24 Perl 36.10 205,436 464 36.38 100% 0% 0% 0%
26 Ruby #9 38.20 317,424 335 71.96 5% 36% 47% 100%
29 Racket CS 43.26 1,235,248 541 43.78 0% 1% 1% 100%
30 Swift 43.98 880,444 715 78.94 9% 57% 29% 85%
30 Go #3 44.75 496,332 829 108.15 58% 56% 61% 67%
31 Go 45.20 467,424 741 108.34 61% 60% 59% 59%
36 Racket 53.75 1,207,948 541 54.81 31% 0% 70% 1%
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%
37 C# aot 54.37 1,051,608 635 55.69 5% 30% 32% 34%
38 Erlang HiPE #6 56.34 1,994,236 1048 85.86 54% 27% 32% 40%
52 Swift #2 77.09 682,920 671 77.75 59% 0% 1% 41%
85 Dart aot #3 125.34 796,856 1041 140.22 7% 80% 3% 22%
87 Dart exe #3 128.46 797,160 1041 142.87 4% 79% 22% 6%
90 Dart aot #2 132.55 524,388 677 135.72 58% 1% 34% 9%
91 Dart exe #2 133.69 523,572 677 136.58 40% 2% 1% 60%
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
C# aot #7 Bad Output
C# aot #3 Bad Output
C# aot #6 Bad Output
C# aot #2 Bad Output
F# .NET Core #4 Bad Output
F# .NET Core #3 Bad Output
F# .NET Core Bad Output
Fortran Intel Failed
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