The Computer Language
Benchmarks Game

pidigits

program source code, command-line and measurements

× source secs mem gz cpu cpu load
1.0 Chapel #2 1.63 6,192 423 1.63 99% 1% 1% 1%
1.1 Rust #3 1.74 4,420 1366 1.74 2% 0% 1% 99%
1.1 Fortran Intel #4 1.74 3,836 981 1.74 1% 2% 100% 1%
1.1 Rust 1.75 4,416 1420 1.74 1% 2% 100% 1%
1.1 Rust #2 1.75 4,412 1306 1.74 1% 0% 3% 100%
1.2 C gcc #2 1.88 2,720 416 1.87 2% 1% 2% 100%
1.2 C++ g++ #4 1.89 4,380 513 1.88 2% 99% 4% 2%
1.3 C# .NET Core #5 2.06 38,564 973 2.07 100% 1% 4% 1%
1.3 PHP #5 2.15 10,932 399 2.15 100% 2% 1% 0%
1.3 PHP #4 2.18 11,008 389 2.18 1% 100% 0% 0%
1.3 PHP #3 2.18 10,980 504 2.18 100% 0% 1% 0%
1.6 Racket #2 2.61 45,496 1136 2.60 1% 1% 100% 0%
1.8 Go #2 2.97 8,520 733 2.97 0% 1% 1% 100%
1.8 Go 2.98 9,000 708 2.99 28% 7% 59% 16%
1.9 F# .NET Core #4 3.07 37,184 874 3.08 0% 1% 1% 100%
1.9 C# .NET Core #3 3.07 37,412 1026 3.08 0% 1% 1% 100%
1.9 C# .NET Core #4 3.08 36,680 1121 3.08 27% 15% 9% 100%
1.9 F# .NET Core #3 3.10 38,824 909 3.11 0% 3% 4% 98%
1.9 Java  #2 3.13 37,364 938 3.36 99% 2% 3% 4%
2.0 PHP #2 3.24 11,352 545 3.23 0% 1% 2% 100%
2.1 Ruby #5 3.42 289,440 485 6.88 64% 38% 100% 4%
2.1 Python 3 #2 3.47 10,364 386 3.47 0% 1% 100% 0%
2.2 Perl #4 3.60 7,844 261 3.59 1% 1% 0% 100%
2.4 Perl #2 3.88 7,776 389 3.88 0% 100% 1% 1%
2.6 Haskell GHC #3 4.22 9,728 379 5.17 45% 11% 10% 64%
2.6 Haskell GHC #2 4.23 9,684 585 5.25 9% 8% 9% 100%
4.1 OCaml #5 6.72 19,888 458 6.71 1% 1% 100% 0%
5.6 Ruby #2 9.14 193,252 658 18.51 43% 61% 96% 4%
6.7 Dart app-jit #2 10.92 92,748 500 11.11 1% 2% 10% 90%
6.7 Ada 2012 GNAT 10.94 4,700 1157 10.94 1% 100% 0% 0%
6.9 Dart #2 11.23 114,600 500 11.75 4% 98% 2% 3%
8.5 Erlang HiPE #3 13.86 50,956 562 16.69 17% 35% 49% 23%
9.0 Erlang HiPE #2 14.56 44,572 512 18.00 60% 15% 26% 25%
9.8 Perl 15.93 11,392 463 15.92 37% 1% 1% 63%
12 Java 19.30 191,684 800 20.61 3% 4% 5% 98%
14 Lisp SBCL #2 22.09 128,008 648 22.05 0% 100% 0% 0%
15 F# .NET Core #2 24.74 80,556 701 25.91 27% 22% 29% 28%
15 JRuby 24.88 793,764 518 36.05 26% 56% 36% 28%
17 Racket 27.09 132,912 453 27.05 1% 1% 100% 0%
17 Substrate VM 28.18 268,384 800 28.14 0% 100% 0% 1%
18 Matz's Ruby 29.32 17,328 518 29.26 1% 1% 100% 0%
18 Ruby 29.96 131,516 518 60.67 60% 39% 27% 79%
24 F# .NET Core 39.72 107,184 513 41.53 25% 24% 29% 28%
335 PHP 9 min 11,936 736 9 min 23% 78% 0% 0%
Ada 2012 GNAT #2 Bad Output
C gcc Bad Output
Chapel Bad Output
C# .NET Core #2 Failed
C++ g++ #3 Timed Out
Erlang HiPE Bad Output
Fortran Intel #3 Make Error
Fortran Intel Failed
Go #3 Bad Output
Haskell GHC #4 Make Error
Haskell GHC Make Error
Substrate VM #2 Failed
Node js #3 Bad Output
Node js #4 Bad Output
Julia Bad Output
Lisp SBCL #4 Timed Out
Lisp SBCL #3 Bad Output
Lisp SBCL Bad Output
Lua #7 Failed
Lua Failed
Lua #5 Failed
Free Pascal Bad Output
Free Pascal #2 Bad Output
Free Pascal #3 Bad Output
Matz's Ruby #5 Failed
Matz's Ruby #2 Failed
JRuby #5 Failed
Truffle Ruby #5 Make Error
Truffle Ruby #2 Make Error
Truffle Ruby Make Error
VW Smalltalk #4 Bad Output
Swift #2 Bad Output
Swift Make Error