The Computer Language
Benchmarks Game

pidigits

We accept something intermediate between chaos and rigidity — enough flex & slop & play to allow for Haskell programs that are not just mechanically translated from Fortran; enough similarity in the basic workloads & tested results.

Programming language advocates and curious programmers have contributed new programs and introduced newer techniques. Look at the slower simple sequential programs, and  look at the parallel programs written for multicore, and  look at the low-level programs written for SIMD. Always look at the source code.

× source secs mem gz busy cpu load
1.0 Chapel #2 1.63 6,236 423 1.72 99% 2% 1% 2%
1.0 Chapel 1.63 6,280 501 1.69 99% 1% 0% 4%
1.1 Free Pascal #3 1.73 2,436 530 1.80 99% 1% 1% 2%
1.1 Fortran Intel #4 1.74 4,004 981 1.79 0% 2% 1% 99%
1.1 C gcc 1.75 2,812 452 1.79 100% 0% 2% 1%
1.1 Rust #3 1.75 3,052 1366 1.78 1% 0% 1% 100%
1.1 Ada 2012 GNAT #2 1.75 4,644 1130 1.78 1% 1% 0% 100%
1.1 Swift #2 1.75 8,976 600 1.79 1% 1% 0% 100%
1.1 Rust 1.75 3,068 1420 1.83 2% 0% 3% 100%
1.1 Rust #2 1.75 3,068 1306 1.75 100% 0% 0% 0%
1.2 F# .NET Core #6 1.88 35,788 905 1.94 2% 2% 1% 98%
1.2 C gcc #2 1.88 2,732 416 2.36 0% 100% 13% 13%
1.2 C++ g++ #4 1.89 4,552 513 1.92 1% 100% 1% 0%
1.3 C# aot #5 2.05 37,204 973 2.14 2% 0% 2% 100%
1.3 Go #3 2.10 8,448 603 2.17 1% 48% 55% 0%
1.3 C# .NET Core #5 2.11 36,632 973 2.21 99% 2% 1% 3%
1.3 PHP #5 2.17 9,272 399 2.20 1% 100% 0% 0%
1.3 PHP #3 2.19 9,292 504 2.24 1% 1% 100% 0%
1.3 Julia #2 2.19 166,356 674 2.55 6% 99% 6% 6%
1.4 PHP #4 2.20 9,284 389 2.23 100% 0% 1% 0%
1.4 Racket #2 2.28 37,324 1136 2.31 100% 0% 0% 0%
1.6 Racket CS #2 2.64 90,656 1136 2.71 1% 1% 100% 1%
1.8 Go 2.94 9,024 708 3.05 20% 1% 2% 81%
1.9 Go #2 3.04 8,856 733 3.15 52% 1% 1% 49%
1.9 Java  #2 3.07 39,320 938 3.31 2% 5% 3% 98%
1.9 C# aot #4 3.07 32,780 1121 3.12 1% 99% 1% 1%
1.9 C# aot #3 3.08 36,272 1026 3.18 2% 99% 2% 1%
1.9 C# .NET Core #4 3.14 32,504 1121 3.28 1% 100% 2% 1%
1.9 F# .NET Core #4 3.14 36,608 874 3.24 2% 98% 2% 1%
1.9 C# .NET Core #3 3.16 36,012 1026 3.55 2% 6% 5% 99%
1.9 F# .NET Core #3 3.17 38,008 909 3.22 0% 1% 100% 1%
2.0 Java OpenJ9 #2 3.19 79,880 938 3.86 0% 97% 4% 19%
2.0 Ruby #5 3.22 328,844 485 7.50 77% 49% 75% 33%
2.0 F# .NET Core #5 3.22 42,224 865 3.30 1% 99% 1% 2%
2.0 PHP #2 3.26 9,644 545 3.37 3% 0% 0% 100%
2.1 Python 3 #2 3.47 10,356 386 3.53 1% 1% 0% 100%
2.3 Perl #4 3.69 8,300 261 3.80 1% 1% 1% 100%
2.4 Perl #2 3.96 8,312 389 4.09 100% 1% 0% 3%
2.6 Haskell GHC #2 4.22 9,964 585 5.27 8% 100% 9% 9%
2.6 Haskell GHC #3 4.24 10,160 379 5.30 8% 100% 8% 9%
3.0 Julia 4.87 218,264 275 5.24 2% 3% 99% 2%
4.1 OCaml #5 6.74 20,108 458 7.00 1% 3% 100% 0%
5.7 Ruby #2 9.24 205,492 658 18.93 77% 92% 13% 24%
6.7 Free Pascal #2 10.94 2,672 828 11.07 100% 0% 0% 1%
6.7 Ada 2012 GNAT 10.94 4,856 1157 11.07 0% 0% 1% 100%
6.9 Dart snapshot #2 11.18 98,012 500 11.67 1% 7% 95% 1%
7.0 Dart #2 11.36 115,156 500 11.91 2% 2% 2% 99%
7.2 Dart aot #2 11.65 30,500 500 11.82 1% 28% 73% 0%
7.2 Dart exe #2 11.67 30,308 500 11.84 1% 100% 0% 1%
7.6 Lisp SBCL #3 12.36 228,532 493 12.43 100% 0% 0% 0%
7.6 Node js #4 12.42 64,436 530 12.54 100% 1% 0% 0%
9.4 VW Smalltalk #4 15.24 55,612 753 15.31 0% 66% 34% 0%
9.6 Pharo Smalltalk 15.58 122,056 698 15.79 87% 0% 0% 14%
10 Erlang HiPE #3 16.28 29,064 562 20.61 18% 99% 2% 8%
10 Erlang HiPE #2 16.89 34,944 512 19.27 12% 4% 8% 90%
11 Erlang HiPE 18.12 31,884 559 18.67 1% 22% 80% 1%
12 Java 19.83 328,072 800 21.57 82% 5% 4% 18%
14 Lisp SBCL #2 22.13 235,828 648 22.37 27% 0% 0% 74%
15 F# .NET Core #2 23.80 63,880 701 27.22 36% 31% 29% 19%
15 Java OpenJ9 23.98 151,100 800 35.78 53% 41% 18% 37%
15 Racket CS 24.58 88,536 453 25.12 50% 1% 0% 51%
16 Free Pascal 25.23 652 3060 25.49 0% 1% 100% 0%
16 JRuby 25.30 780,436 518 37.62 25% 78% 32% 14%
16 Node js #3 26.66 64,492 553 27.07 90% 0% 0% 11%
17 Racket 26.89 131,596 453 27.19 0% 89% 12% 0%
18 Matz's Ruby 29.43 18,384 518 29.65 100% 0% 0% 0%
18 Ruby 29.85 131,208 518 61.57 93% 52% 51% 11%
23 F# .NET Core 38.05 82,696 513 42.44 18% 43% 37% 14%
334 PHP 9 min 10,548 736 9 min 0% 78% 23% 1%
C++ g++ #3 Timed Out
Fortran Intel #3 Make Error
Fortran Intel Failed
Haskell GHC #4 Make Error
Haskell GHC Make Error
Lisp SBCL #4 Failed
Lisp SBCL Bad Output
Lua #7 Failed
Lua Failed
Lua #5 Failed
Perl Failed
Matz's Ruby #5 Failed
Matz's Ruby #2 Failed
JRuby #5 Failed
Swift Make Error