The Computer Language
Benchmarks Game

regex-redux

program source code, command-line and measurements

× source secs mem gz cpu cpu load
1.0 C gcc #4 1.89 155,412 1230 4.28 100% 47% 42% 41%
1.5 C gcc #3 2.86 106,260 1266 4.47 19% 18% 100% 21%
1.7 Rust 3.28 222,916 804 6.46 33% 100% 32% 35%
1.8 Rust #2 3.33 207,132 701 6.53 88% 33% 33% 45%
1.8 PHP 3.37 155,708 786 3.24 20% 93% 24% 27%
2.1 Hack 3.92 271,128 786 3.83 30% 24% 76% 27%
2.1 Node.js #2 4.02 507,480 452 4.02 0% 1% 100% 0%
2.1 Node.js 4.03 555,184 432 4.03 100% 1% 1% 1%
2.2 TypeScript #3 4.20 650,072 610 4.20 1% 100% 2% 1%
2.3 TypeScript 4.27 484,440 440 4.30 3% 1% 100% 1%
2.3 TypeScript #2 4.28 475,416 440 4.29 1% 1% 100% 1%
2.4 Pascal Free Pascal #2 4.45 103,404 1459 5.63 91% 17% 10% 10%
2.4 C gcc #2 4.48 105,916 1115 4.47 100% 2% 0% 0%
3.2 C++ g++ #5 6.02 218,304 848 8.57 15% 100% 14% 15%
3.6 C++ g++ #2 6.75 183,256 700 9.80 100% 39% 8% 0%
4.3 Pascal Free Pascal 8.06 102,456 1234 8.05 0% 1% 100% 0%
5.2 C++ g++ 9.79 202,324 656 9.78 1% 0% 0% 100%
5.6 Chapel 10.58 1,138,908 477 20.89 100% 14% 14% 73%
6.4 Java  #3 12.16 927,212 929 37.28 73% 81% 75% 78%
7.6 Perl #3 14.47 158,244 839 43.19 95% 74% 67% 63%
7.9 Python 3 14.87 433,868 486 28.02 32% 45% 84% 29%
8.6 C++ g++ #3 16.34 218,684 853 24.91 1% 71% 25% 58%
9.6 Java 18.17 835,688 868 34.87 37% 73% 52% 33%
13 OCaml #2 24.64 968,356 622 24.61 100% 1% 1% 0%
13 Perl #2 24.95 205,992 699 42.12 100% 69% 1% 0%
13 Clojure #3 25.10 933,524 719 45.68 55% 58% 24% 47%
15 Lisp SBCL #3 28.64 767,024 1961 52.91 69% 32% 50% 36%
15 Ruby #2 28.80 309,760 424 28.77 15% 48% 20% 19%
16 Ruby JRuby #2 29.48 1,554,812 424 66.90 59% 68% 50% 52%
16 Go #2 29.76 353,332 798 62.56 50% 67% 53% 41%
16 Scala 31.04 800,156 620 33.85 88% 7% 10% 6%
16 C# .NET Core #4 31.11 1,230,080 856 106.12 90% 87% 92% 74%
17 Dart #2 31.42 469,528 656 33.79 38% 56% 10% 6%
18 Perl 34.01 206,564 454 34.00 0% 0% 0% 100%
20 Ruby #9 37.89 260,460 315 37.87 1% 0% 100% 1%
27 Racket 50.77 1,000,916 536 50.76 100% 1% 1% 1%
28 Go 53.47 322,512 737 125.82 70% 55% 65% 46%
51 Swift #2 97.35 695,008 671 97.30 1% 100% 1% 1%
55 C# .NET Core 104.83 923,356 635 105.19 9% 1% 1% 91%
56 F# .NET Core #2 105.80 1,028,144 426 106.18 1% 100% 1% 1%
Ada 2005 GNAT #5 Bad Output
Ada 2005 GNAT #6 Bad Output
C gcc Bad Output
Clojure #4 Bad Output
C# .NET Core #2 Bad Output
C# .NET Core #3 Bad Output
C# .NET Core #8 Bad Output
C# .NET Core #6 Bad Output
C# .NET Core #7 Bad Output
Erlang #6 Bad Output
Erlang HiPE #6 Bad Output
F# .NET Core #4 Bad Output
F# .NET Core #3 Bad Output
F# .NET Core Bad Output
Go #9 Bad Output
Haskell GHC #2 Bad Output
Hack #4 Bad Output
Java #2 Bad Output
Java #4 Bad Output
Java #5 Bad Output
Lua #2 Bad Output
OCaml #4 Bad Output
PHP #4 Bad Output
Ruby #6 Bad Output
Ruby #8 Bad Output
Swift #3 Bad Output