The Computer Language
Benchmarks Game

pidigits

program source code, command-line and measurements

× source secs KB gz cpu cpu load
1.0 Chapel 1.60 22,088 501 1.60 99% 4% 2% 1%
1.0 Chapel #2 1.61 22,252 423 1.60 99% 1% 3% 1%
1.1 Pascal Free Pascal #3 1.73 2,300 482 1.72 2% 0% 1% 100%
1.1 C gcc 1.73 1,992 448 1.73 1% 100% 1% 0%
1.1 Ada 2005 GNAT #2 1.73 3,716 1065 1.73 2% 1% 100% 1%
1.1 Rust 1.74 7,880 1420 1.74 99% 1% 1% 1%
1.2 C++ g++ #4 1.89 3,740 508 1.89 2% 99% 0% 2%
1.2 Lua #5 1.94 3,156 479 1.94 1% 100% 1% 1%
1.4 PHP #5 2.19 8,852 394 2.18 100% 1% 0% 2%
1.4 Racket #2 2.19 23,252 1122 2.18 100% 0% 0% 1%
1.4 PHP #4 2.20 8,764 384 2.20 1% 1% 0% 100%
1.4 PHP #3 2.22 8,848 500 2.21 100% 1% 0% 2%
1.9 C# .NET Core #3 3.03 38,568 1026 3.02 1% 1% 100% 1%
1.9 Lua 3.03 2,888 522 3.03 2% 2% 100% 1%
1.9 Go #2 3.04 8,332 729 3.04 38% 1% 60% 3%
1.9 Go 3.05 15,160 704 3.06 71% 20% 4% 24%
1.9 F# .NET Core #3 3.06 40,048 903 3.05 100% 0% 1% 2%
1.9 Java  #2 3.11 33,364 938 3.20 99% 2% 2% 2%
2.0 Ruby #5 3.15 482,924 478 3.14 1% 1% 2% 100%
2.1 PHP #2 3.36 9,304 537 3.35 1% 0% 100% 2%
2.2 Perl #4 3.53 6,836 261 3.52 0% 0% 1% 100%
2.4 Perl #2 3.92 6,784 385 3.92 1% 0% 33% 68%
2.5 Lua #7 3.97 3,220 477 3.97 0% 1% 2% 100%
3.2 Swift 5.07 7,388 1017 5.06 100% 0% 1% 1%
3.4 Clojure #4 5.43 409,644 1794 8.02 16% 37% 26% 71%
6.8 Ada 2005 GNAT 10.94 4,440 1143 10.93 0% 100% 1% 0%
6.9 Pascal Free Pascal #2 10.99 2,052 785 10.98 0% 100% 1% 0%
7.0 C# Mono LLVM #3 11.22 39,092 1026 11.21 1% 100% 1% 0%
7.3 Smalltalk VW #4 11.76 54,064 652 11.75 0% 100% 1% 1%
7.4 Lisp SBCL #3 11.94 231,512 493 11.91 100% 1% 1% 0%
10 Perl 15.87 9,032 452 15.86 1% 100% 1% 1%
10 Erlang HiPE #2 16.00 38,356 512 18.67 3% 36% 4% 76%
10 Erlang #2 16.25 37,528 512 18.92 9% 1% 100% 10%
10 Erlang 16.81 36,532 559 16.91 1% 6% 95% 1%
11 Java 17.08 380,932 800 17.91 39% 21% 33% 15%
11 Erlang HiPE 17.81 37,220 559 17.91 1% 1% 1% 99%
12 Clojure #2 18.46 404,164 571 21.88 28% 30% 40% 25%
12 Clojure #3 19.48 409,700 482 24.44 28% 36% 26% 38%
13 Racket 20.37 121,860 453 20.34 1% 100% 0% 1%
13 Ruby JRuby 20.41 681,636 518 27.32 69% 32% 23% 11%
13 Lisp SBCL #2 21.22 238,112 645 21.17 100% 1% 1% 0%
16 Pascal Free Pascal 25.26 652 3042 25.25 100% 1% 0% 0%
16 F# .NET Core #2 26.08 98,624 689 28.46 25% 33% 12% 41%
19 Ruby 29.96 163,580 518 29.90 1% 100% 0% 1%
21 C# Mono LLVM #2 33.79 67,256 856 33.98 1% 17% 1% 84%
26 F# .NET Core 41.91 111,948 513 45.84 38% 31% 8% 34%
293 Hack 7 min 120,256 735 7 min 100% 1% 1% 1%
326 PHP 8 min 10,184 736 8 min 1% 85% 15% 1%
C# .NET Core #2 Failed
C++ g++ #3 Timed Out
Fortran Intel #3 Make Error
Fortran Intel Failed
Haskell GHC #4 Make Error
Node.js #2 Bad Output
Lisp SBCL Bad Output
OCaml #2 Make Error
OCaml Make Error
OCaml #4 Make Error
OCaml #3 Make Error
Ruby #2 Failed
Ruby JRuby #5 Failed
Scala #4 Failed
Scala #3 Failed