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 2.49 1,940 482 2.48 1% 100% 1% 100%
1.0 C gcc 2.50 1,992 448 2.50 2% 1% 1% 100%
1.0 Ada 2005 GNAT #2 2.50 3,516 1065 2.50 2% 0% 0% 100%
1.0 Rust 2.52 8,068 1420 2.51 1% 0% 1% 100%
1.0 Chapel 2.52 20,768 501 2.52 100% 0% 0% 2%
1.1 C++ g++ #3 2.68 3,680 682 2.67 0% 1% 3% 100%
1.1 Lisp SBCL 2.75 16,388 1073 2.75 0% 1% 1% 100%
1.1 PHP #5 2.81 8,264 394 2.80 0% 1% 1% 100%
1.1 PHP #4 2.82 8,216 384 2.81 0% 1% 1% 100%
1.1 Lua #5 2.82 3,088 479 2.82 1% 1% 1% 100%
1.2 Racket #2 2.96 17,232 1122 2.96 2% 0% 0% 100%
1.5 Pascal Free Pascal #2 3.76 1,888 785 3.76 1% 100% 3% 100%
1.5 Ada 2005 GNAT 3.77 3,932 1143 3.77 0% 0% 1% 100%
1.6 Go #2 3.86 8,032 729 3.85 2% 0% 0% 100%
1.6 Go 3.86 7,976 704 3.86 1% 1% 1% 100%
1.6 Lua 4.03 2,960 522 4.02 2% 0% 0% 100%
1.6 Ruby #5 4.04 626,044 478 4.02 0% 1% 1% 100%
1.6 F# Mono LLVM #3 4.09 40,772 903 4.08 0% 1% 1% 100%
1.6 C# Mono LLVM #3 4.10 39,488 1026 4.09 0% 1% 1% 100%
1.7 Java  #2 4.14 25,988 938 4.13 1% 1% 0% 100%
1.8 PHP #2 4.42 8,624 537 4.42 1% 0% 1% 100%
1.8 Perl #4 4.51 5,452 261 4.51 0% 0% 1% 100%
2.0 Perl #2 4.86 5,552 385 4.86 1% 1% 0% 100%
3.8 Clojure #4 9.54 397,788 1794 9.53 1% 1% 100% 100%
6.5 Perl 16.27 6,808 452 16.26 0% 1% 1% 100%
6.7 Erlang HiPE #2 16.56 20,624 512 16.54 0% 1% 1% 100%
6.9 Erlang HiPE 17.21 21,644 559 17.18 0% 1% 1% 100%
8.5 Node.js #2 21.08 1,580,664 464 21.04 1% 1% 0% 100%
8.6 Ruby 21.32 159,712 518 21.27 1% 1% 100% 100%
10 Smalltalk VW #4 25.20 30,020 652 25.19 0% 1% 1% 100%
10 Racket 25.31 110,100 453 25.27 0% 1% 1% 100%
11 Java 26.33 376,900 800 26.29 3% 1% 0% 100%
12 Clojure #2 29.49 394,312 571 29.44 1% 100% 1% 100%
13 Clojure #3 31.69 395,120 482 31.64 1% 1% 100% 100%
13 Lisp SBCL #2 32.57 65,280 645 32.52 1% 1% 1% 100%
14 Ruby JRuby 34.41 651,944 518 34.34 0% 1% 1% 100%
16 Pascal Free Pascal 40.66 644 3042 40.64 1% 100% 1% 100%
29 F# Mono LLVM #2 72.16 72,684 689 72.06 1% 1% 1% 100%
33 C# Mono LLVM #2 82.21 65,368 856 82.10 0% 1% 1% 100%
37 F# Mono LLVM 91.14 73,924 513 91.00 1% 1% 0% 100%
229 PHP 9 min 9,076 736 9 min 1% 1% 1% 100%
Fortran Intel Failed
Fortran Intel #3 Make Error
Haskell GHC #4 Make Error
OCaml Make Error
OCaml #2 Make Error
OCaml #3 Make Error
OCaml #4 Make Error
Ruby #2 Failed
Ruby JRuby #5 Failed
Scala #3 Failed
Scala #4 Failed