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