The Computer Language
Benchmarks Game

pidigits

program source code, command-line and measurements

× source secs KB gz cpu cpu load
1.0 Pascal Free Pascal #3 1.73 2,300 482 1.72 2% 0% 1% 100%
1.0 C gcc 1.73 1,992 448 1.73 2% 6% 1% 100%
1.0 Rust 1.74 8,104 1420 1.74 1% 0% 1% 99%
1.1 Fortran Intel #3 1.92 1,572 975 1.91 0% 2% 100% 3%
1.1 Lua #5 1.94 3,156 479 1.94 1% 100% 1% 1%
1.3 Racket #2 2.18 21,312 1122 2.18 100% 0% 1% 1%
1.3 PHP #5 2.19 8,852 394 2.18 100% 1% 0% 2%
1.3 PHP #4 2.20 8,764 384 2.20 1% 1% 0% 100%
1.3 Python 3 #5 2.20 10,248 335 2.20 1% 0% 0% 100%
1.3 PHP #3 2.21 8,952 500 2.20 1% 0% 1% 100%
1.3 C++ g++ #3 2.29 3,984 682 2.29 0% 1% 100% 1%
1.3 Ada 2005 GNAT #2 2.29 4,344 1254 2.29 2% 0% 0% 100%
1.3 C gcc #4 2.30 2,304 541 2.29 100% 1% 0% 1%
1.3 Fortran Intel #2 2.30 1,596 934 2.30 1% 1% 100% 1%
1.4 Lua #3 2.34 3,092 414 2.34 0% 1% 1% 100%
1.4 Lisp SBCL 2.37 20,812 1073 2.36 0% 0% 100% 2%
1.4 Python 3 #2 2.42 10,100 256 2.41 100% 0% 1% 0%
1.6 Haskell GHC #4 2.82 11,800 341 4.14 18% 15% 15% 100%
1.7 Go 2.85 11,140 685 2.88 1% 35% 35% 32%
1.7 Scala #4 2.97 61,272 1125 3.53 33% 3% 73% 11%
1.8 Lua 3.03 2,888 522 3.03 2% 2% 100% 1%
1.8 Java  #2 3.11 33,364 938 3.20 99% 2% 2% 2%
1.9 PHP #2 3.36 9,304 537 3.35 1% 0% 100% 2%
2.0 Perl #3 3.52 6,836 301 3.51 100% 0% 1% 1%
2.0 Perl #4 3.53 6,836 261 3.52 0% 0% 1% 100%
2.1 Lua #7 3.71 3,080 477 3.71 2% 2% 100% 1%
2.2 Go #2 3.86 10,540 674 4.24 31% 26% 26% 29%
2.3 Go #4 3.89 10,484 607 4.28 29% 26% 26% 31%
2.3 Perl #2 3.92 6,784 385 3.92 1% 0% 33% 68%
2.3 Java  #3 4.04 72,600 1826 9.33 64% 54% 52% 63%
2.4 Java  #4 4.10 61,204 1808 9.34 60% 59% 56% 52%
3.1 Clojure #4 5.43 409,644 1794 8.02 16% 37% 26% 71%
6.3 Ada 2005 GNAT 10.94 4,440 1143 10.93 0% 100% 1% 0%
6.4 Pascal Free Pascal #2 10.99 2,052 785 10.98 0% 100% 1% 0%
6.5 Dart 11.16 45,008 321 11.23 1% 99% 1% 1%
6.5 Ruby #3 11.18 163,168 242 11.16 96% 0% 1% 6%
6.5 F# Mono #3 11.19 40,328 903 11.19 100% 1% 1% 0%
6.5 Ruby #4 11.20 162,720 240 11.17 58% 1% 1% 42%
6.5 C# Mono #3 11.22 39,016 1026 11.22 1% 1% 1% 100%
6.8 Smalltalk VW #4 11.76 54,064 652 11.75 0% 100% 1% 1%
7.3 Ruby JRuby #4 12.64 681,276 240 18.39 20% 75% 12% 42%
7.6 Ruby JRuby #3 13.10 708,064 242 21.28 37% 33% 75% 20%
8.3 Scala #3 14.26 383,440 479 15.54 46% 11% 18% 36%
9.2 Perl 15.87 9,032 452 15.86 1% 100% 1% 1%
9.3 Erlang HiPE #2 16.00 38,356 512 18.67 3% 36% 4% 76%
9.3 Node.js #2 16.05 1,052,272 464 16.04 100% 1% 1% 0%
9.4 Erlang #2 16.25 37,528 512 18.92 9% 1% 100% 10%
9.7 Erlang 16.81 36,532 559 16.91 1% 6% 95% 1%
9.9 Java  17.08 380,932 800 17.91 39% 21% 33% 15%
10 Erlang HiPE 17.81 37,220 559 17.91 1% 1% 1% 99%
11 Clojure #2 18.46 404,164 571 21.88 28% 30% 40% 25%
11 Clojure #3 19.48 409,700 482 24.44 28% 36% 26% 38%
12 Racket 20.22 124,204 453 20.20 1% 1% 1% 100%
12 Ruby JRuby 20.41 681,636 518 27.32 69% 32% 23% 11%
13 Lisp SBCL #2 21.74 131,036 645 21.70 81% 1% 1% 20%
15 Pascal Free Pascal 25.26 652 3042 25.25 100% 1% 0% 0%
17 Ruby 29.96 163,580 518 29.90 1% 100% 0% 1%
19 C# Mono #2 33.54 66,560 856 33.68 75% 25% 1% 0%
23 F# Mono 40.00 77,712 513 40.26 9% 1% 52% 41%
277 Hack 7 min 135,728 735 7 min 29% 1% 1% 72%
303 PHP 8 min 10,184 736 8 min 1% 85% 15% 1%
Clojure #5 Failed
Fortran Intel Failed
Lua #2 Failed
OCaml #2 Make Error
OCaml Make Error
OCaml #4 Make Error
OCaml #3 Make Error
Ruby #2 Failed
Ruby #5 Failed
Scala Failed