The Computer Language
Benchmarks Game

regex-redux

program source code, command-line and measurements

× source secs mem gz cpu cpu load
1.0 PHP 3.34 158,792 786 3.30 25% 26% 22% 92%
1.2 Hack 3.92 271,128 786 3.83 30% 24% 76% 27%
1.2 C gcc #4 1.45 155,768 1230 4.03 61% 64% 56% 100%
1.3 C gcc #2 4.14 106,152 1115 4.14 1% 100% 0% 1%
1.3 C gcc #3 2.39 105,944 1266 4.17 100% 31% 23% 24%
1.3 Rust #2 2.90 173,548 701 4.30 17% 86% 30% 17%
1.3 Rust 2.81 211,044 804 4.30 19% 100% 18% 19%
1.3 TypeScript #3 4.36 601,632 610 4.36 1% 1% 1% 100%
1.3 TypeScript #2 4.44 552,852 440 4.44 1% 1% 37% 64%
1.3 TypeScript 4.44 552,772 440 4.44 37% 27% 1% 37%
1.3 Node.js #2 4.44 511,916 452 4.45 0% 87% 2% 14%
1.4 Node.js 4.46 643,092 432 4.47 1% 1% 96% 4%
1.6 Pascal Free Pascal #2 3.75 99,488 1459 5.15 20% 16% 14% 90%
2.3 Pascal Free Pascal 7.61 99,440 1234 7.60 0% 100% 1% 0%
5.2 Chapel 8.70 843,100 477 17.28 100% 15% 15% 71%
7.5 OCaml #2 24.92 968,548 622 24.89 1% 1% 1% 100%
7.6 C++ g++ #3 17.14 220,088 853 25.22 95% 3% 51% 1%
7.7 Ada 2005 GNAT #5 8.70 163,000 3618 25.50 86% 78% 69% 60%
8.5 Python 3 14.86 439,208 486 27.92 46% 77% 35% 31%
8.7 Ruby #2 28.80 309,760 424 28.77 15% 48% 20% 19%
8.9 Java  #3 10.38 634,548 929 29.48 70% 64% 69% 82%
9.3 Java 16.62 629,640 868 30.58 30% 43% 72% 41%
9.7 Dart #2 29.93 460,276 656 32.08 27% 7% 39% 37%
10 Perl 34.01 206,564 454 34.00 0% 0% 0% 100%
11 Ruby #9 37.89 260,460 315 37.87 1% 0% 100% 1%
13 Perl #2 24.95 205,992 699 42.12 100% 69% 1% 0%
13 Perl #3 14.47 158,244 839 43.19 95% 74% 67% 63%
13 Perl #4 14.13 156,872 804 43.42 72% 89% 52% 95%
15 Racket 50.50 1,013,084 536 50.50 1% 0% 50% 51%
16 Lisp SBCL #3 28.07 761,376 1961 52.62 47% 41% 40% 62%
19 Go #2 29.29 344,348 798 61.79 37% 59% 79% 38%
25 Ruby JRuby #2 34.34 1,275,904 424 82.77 51% 48% 69% 75%
28 Swift #2 94.00 695,688 671 93.94 7% 40% 2% 59%
33 C# .NET Core 109.55 1,336,376 635 109.81 0% 91% 10% 1%
33 F# .NET Core #2 109.91 1,461,488 426 110.17 81% 3% 9% 10%
33 F# .NET Core #5 30.77 1,450,708 529 110.41 87% 90% 97% 86%
33 C# .NET Core #4 32.00 1,623,768 856 110.50 98% 74% 92% 82%
34 C# .NET Core #9 31.22 1,541,376 659 111.36 92% 91% 86% 89%
34 C# .NET Core #5 31.19 1,696,208 673 111.64 97% 89% 92% 80%
38 Go 51.78 322,840 737 124.33 58% 52% 79% 53%
43 Swift 75.47 882,900 715 141.92 90% 2% 1% 100%
Ada 2005 GNAT #6 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
C++ g++ #5 Failed
C++ g++ #2 Failed
C++ g++ Failed
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