The Computer Language
Benchmarks Game

pidigits

program source code, command-line and measurements

× source secs mem gz cpu cpu load
1.0 Chapel 1.63 6,488 501 1.63 99% 2% 0% 1%
1.0 Chapel #2 1.63 6,416 423 1.64 99% 1% 1% 1%
1.1 Free Pascal #3 1.73 2,368 530 1.73 1% 1% 1% 100%
1.1 Rust #3 1.74 4,520 1366 1.74 1% 3% 0% 99%
1.1 Rust #2 1.74 4,544 1306 1.74 0% 1% 100% 0%
1.1 Rust 1.74 4,560 1420 1.74 0% 99% 1% 2%
1.1 Ada 2012 GNAT #2 1.75 4,508 1068 1.75 1% 1% 0% 100%
1.1 C gcc 1.75 2,708 452 1.75 1% 100% 0% 1%
1.1 Swift #2 1.76 8,368 601 1.76 0% 100% 0% 1%
1.2 C++ g++ #4 1.89 4,312 513 1.88 1% 1% 99% 1%
1.3 Go #3 2.04 8,964 603 2.04 0% 83% 18% 0%
1.3 PHP #5 2.12 10,664 399 2.11 100% 0% 1% 1%
1.3 PHP #4 2.12 10,512 389 2.12 100% 0% 0% 2%
1.3 PHP #3 2.14 10,672 504 2.14 1% 0% 0% 100%
1.4 Racket #2 2.26 30,536 1136 2.26 100% 2% 0% 0%
1.8 Go 2.95 9,192 708 2.96 11% 40% 50% 1%
1.8 Go #2 2.97 9,200 733 2.97 0% 1% 100% 1%
1.9 C# .NET Core #4 3.06 36,204 1121 3.06 98% 1% 2% 3%
1.9 C# .NET Core #3 3.07 37,068 1026 3.08 100% 1% 2% 0%
1.9 F# .NET Core #4 3.08 37,256 874 3.09 98% 1% 0% 3%
1.9 F# .NET Core #3 3.10 38,652 909 3.11 4% 0% 1% 98%
1.9 Java  #2 3.13 37,324 938 3.35 98% 5% 3% 3%
2.0 PHP #2 3.21 10,968 545 3.20 1% 0% 1% 100%
2.1 Ruby #5 3.39 274,164 485 6.82 58% 15% 90% 43%
2.2 Perl #4 3.50 7,348 261 3.50 100% 1% 1% 1%
2.2 Python 3 #2 3.51 10,500 386 3.50 1% 1% 0% 100%
2.4 Perl #2 3.83 7,320 389 3.83 2% 1% 100% 1%
2.6 Haskell GHC #2 4.20 9,724 585 5.12 27% 8% 8% 81%
2.6 Haskell GHC #3 4.22 9,772 379 5.18 8% 38% 72% 8%
4.1 OCaml #5 6.69 19,852 458 6.68 100% 0% 1% 0%
5.6 Ruby #2 9.04 187,616 658 18.35 54% 5% 100% 47%
6.7 Free Pascal #2 10.94 2,596 828 10.93 0% 100% 1% 0%
6.7 Ada 2012 GNAT 10.94 4,752 1157 10.94 1% 100% 0% 0%
6.9 Dart #2 11.31 133,492 500 11.80 97% 1% 3% 5%
7.6 Lisp SBCL #3 12.29 129,140 493 12.26 0% 0% 100% 1%
7.8 VW Smalltalk #4 12.63 55,416 788 12.62 0% 0% 1% 100%
8.5 Erlang HiPE #3 13.79 46,228 562 16.86 13% 25% 6% 79%
8.8 Node js #4 14.26 63,864 530 14.34 1% 47% 54% 1%
9.0 Erlang HiPE #2 14.57 43,304 512 18.09 16% 65% 38% 7%
9.5 Perl 15.45 10,876 463 15.44 0% 81% 19% 1%
10 Erlang HiPE 16.17 40,480 559 16.61 4% 1% 53% 46%
12 Java 19.32 244,076 800 20.89 4% 10% 91% 5%
14 Lisp SBCL #2 22.11 127,908 648 22.07 100% 0% 1% 0%
15 JRuby 23.74 776,596 518 34.32 19% 14% 78% 35%
15 F# .NET Core #2 24.53 80,344 701 25.71 33% 28% 27% 19%
16 Free Pascal 25.24 652 3060 25.23 0% 1% 100% 0%
16 Node js #3 26.81 63,732 553 26.88 1% 10% 90% 1%
17 Racket 27.25 129,044 453 27.21 0% 1% 1% 100%
18 Matz's Ruby 29.39 17,712 518 29.34 0% 0% 100% 0%
18 Ruby 29.60 114,632 518 59.94 75% 64% 36% 29%
19 Java AOT 30.26 269,940 800 30.22 1% 30% 71% 1%
19 Truffle Ruby 31.61 562,844 518 67.27 55% 50% 55% 53%
24 F# .NET Core 39.53 105,312 513 41.27 21% 35% 34% 16%
335 PHP 9 min 11,680 736 9 min 0% 91% 10% 0%
C# .NET Core #2 Failed
C++ g++ #3 Timed Out
Dart Failed
Fortran Intel #3 Make Error
Fortran Intel Failed
Haskell GHC #4 Make Error
Haskell GHC Make Error
Hack Bad Output
Java AOT #2 Make Error
Lisp SBCL #4 Timed Out
Lisp SBCL Bad Output
Lua #7 Failed
Lua Failed
Lua #5 Failed
Matz's Ruby #5 Failed
Matz's Ruby #2 Failed
JRuby #5 Failed
Truffle Ruby #5 Failed
Truffle Ruby #2 Failed
Swift Make Error