The Computer Language
Benchmarks Game

pidigits

program source code, command-line and measurements

× source secs mem 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,040 482 1.72 1% 1% 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,616 1065 1.73 2% 1% 100% 1%
1.1 Rust #2 1.75 6,280 1306 1.74 2% 1% 1% 100%
1.1 Rust 1.75 6,264 1420 1.74 100% 1% 2% 1%
1.1 Swift #2 1.75 7,416 601 1.75 0% 2% 100% 1%
1.2 C++ g++ #4 1.89 3,740 508 1.89 2% 99% 0% 2%
1.2 Lua #5 1.94 3,248 479 1.93 1% 1% 1% 99%
1.3 Go #3 2.04 10,560 603 2.03 11% 10% 100% 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.8 Go #2 2.93 8,956 729 2.92 2% 1% 100% 1%
1.8 Go 2.93 13,056 704 2.94 10% 41% 38% 13%
1.9 Lua 3.01 3,148 522 3.01 100% 0% 1% 1%
1.9 C# .NET Core #3 3.03 38,372 1026 3.02 1% 0% 100% 2%
1.9 Java  #2 3.06 31,088 938 3.16 0% 3% 9% 92%
1.9 F# .NET Core #3 3.06 40,348 903 3.06 100% 1% 0% 1%
2.0 Ruby #5 3.14 477,092 478 3.12 0% 100% 2% 1%
2.1 PHP #2 3.36 9,304 537 3.35 1% 0% 100% 2%
2.1 Python 3 #2 3.41 9,992 382 3.40 1% 2% 100% 1%
2.2 Perl #4 3.53 6,836 261 3.52 0% 0% 1% 100%
2.3 Lua #7 3.76 3,192 477 3.75 1% 100% 0% 2%
2.4 Perl #2 3.92 6,784 385 3.92 1% 0% 33% 68%
3.4 Clojure #4 5.43 409,644 1794 8.02 16% 37% 26% 71%
5.3 Ruby #2 8.48 227,764 653 8.46 1% 100% 0% 0%
6.8 Ada 2005 GNAT 10.94 4,272 1143 10.94 100% 1% 1% 1%
6.8 Pascal Free Pascal #2 10.94 2,168 785 10.94 1% 100% 0% 0%
7.1 Dart 11.45 67,452 594 11.53 7% 8% 28% 68%
7.3 Smalltalk VW #4 11.76 54,064 652 11.75 0% 100% 1% 1%
7.4 Lisp SBCL #3 11.88 339,372 493 11.85 1% 0% 0% 100%
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.25 381,416 800 18.05 30% 17% 41% 18%
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.84 776,548 518 34.12 28% 91% 17% 30%
13 Lisp SBCL #2 21.31 344,872 645 21.26 1% 1% 100% 1%
16 Pascal Free Pascal 25.23 652 3042 25.22 0% 1% 1% 100%
16 F# .NET Core #2 25.45 98,904 689 27.50 27% 41% 23% 19%
19 Ruby 29.69 163,316 518 29.63 1% 100% 1% 1%
26 F# .NET Core 41.25 116,544 513 44.88 23% 46% 26% 17%
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
Hack Bad Output
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 JRuby #5 Failed
Scala #4 Failed
Scala #3 Failed
Swift Make Error