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%
1.9 Rust #2 2.73 175,372 701 4.24 19% 19% 100% 20%
1.9 Rust 2.80 203,988 804 4.21 17% 19% 100% 18%
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 Node.js #2 4.06 552,548 452 4.06 1% 1% 100% 0%
2.8 TypeScript #3 4.07 733,524 610 4.10 1% 1% 100% 0%
2.8 Node.js 4.08 641,804 432 4.08 0% 1% 100% 1%
2.8 TypeScript #2 4.12 491,304 440 4.14 100% 1% 1% 0%
2.8 TypeScript 4.13 491,120 440 4.15 1% 1% 85% 16%
2.8 C gcc #2 4.14 106,152 1115 4.14 1% 100% 0% 1%
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%
8.5 Java  #3 12.31 902,528 929 38.75 73% 76% 86% 81%
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%
12 C++ g++ #3 17.14 220,088 853 25.22 95% 3% 51% 1%
12 Java 18.03 834,824 868 34.89 48% 63% 45% 39%
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%
20 Lisp SBCL #3 28.66 768,704 1961 53.39 35% 38% 73% 43%
20 Ruby #2 28.80 309,760 424 28.77 15% 48% 20% 19%
20 Ruby JRuby #2 29.48 1,554,812 424 66.90 59% 68% 50% 52%
20 Go #2 29.51 352,804 798 61.51 77% 49% 43% 40%
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%
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%
37 Go 53.83 322,420 737 125.41 55% 54% 67% 59%
57 Swift 83.47 872,904 715 151.55 89% 93% 2% 1%
69 Swift #2 100.43 695,656 671 100.37 1% 1% 66% 35%
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