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 1.63 6,236 501 1.75 99% 1% 3% 4%
1.0 Chapel #2 1.63 6,228 423 1.70 99% 1% 1% 3%
1.1 Free Pascal #3 1.73 2,436 530 1.80 99% 1% 1% 2%
1.1 Fortran Intel #4 1.74 3,876 981 1.76 0% 99% 1% 1%
1.1 Swift #2 1.75 8,880 600 1.83 1% 2% 3% 99%
1.1 C gcc 1.75 2,660 452 2.02 1% 100% 14% 1%
1.1 Rust #3 1.75 2,980 1366 1.78 0% 1% 1% 100%
1.1 Ada 2012 GNAT #2 1.75 4,580 1130 1.78 100% 0% 2% 0%
1.1 Rust #2 1.75 3,104 1306 1.79 1% 0% 100% 1%
1.1 Rust 1.75 3,104 1420 1.81 100% 1% 1% 2%
1.2 C gcc #2 1.88 2,656 416 1.92 1% 1% 1% 100%
1.2 C++ g++ #4 1.89 4,460 513 1.97 100% 2% 2% 1%
1.3 Go #3 2.05 8,444 603 2.10 29% 1% 35% 37%
1.3 C# .NET Core #5 2.11 36,632 973 2.21 99% 2% 1% 3%
1.3 PHP #5 2.16 9,112 399 2.25 100% 2% 2% 0%
1.3 PHP #4 2.18 9,172 389 2.38 4% 6% 100% 0%
1.3 PHP #3 2.19 9,172 504 2.21 0% 100% 1% 0%
1.5 Julia #2 2.45 168,968 674 2.79 5% 98% 5% 5%
1.6 Racket #2 2.59 49,620 1136 2.64 0% 1% 1% 100%
1.7 Racket CS #2 2.70 82,376 1136 2.74 0% 100% 0% 1%
1.8 Go 2.94 8,940 708 3.02 2% 5% 83% 12%
1.8 Go #2 2.96 8,740 733 3.05 0% 2% 51% 49%
1.9 Java  #2 3.07 39,184 938 3.29 99% 3% 4% 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 78,476 938 3.92 21% 55% 46% 1%
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.25 9,480 545 3.29 0% 100% 1% 1%
2.2 Perl #4 3.61 7,780 261 3.72 2% 0% 100% 1%
2.4 Perl #2 3.88 7,708 389 3.97 0% 100% 2% 1%
2.6 Haskell GHC #3 4.21 9,296 379 5.24 9% 100% 8% 8%
2.6 Haskell GHC #2 4.24 9,884 585 5.13 7% 7% 26% 81%
3.1 Julia 4.98 196,808 275 5.38 4% 3% 2% 99%
4.1 OCaml #5 6.74 20,004 458 6.96 1% 1% 100% 1%
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,728 1157 11.08 0% 100% 1% 0%
6.8 Dart snapshot #2 11.08 98,356 500 11.46 2% 1% 1% 99%
6.9 Dart #2 11.30 125,468 500 11.95 3% 2% 98% 3%
7.2 Dart aot #2 11.66 31,420 500 11.75 100% 1% 0% 0%
7.5 Lisp SBCL #3 12.28 129,808 493 12.44 100% 1% 1% 0%
7.6 Node js #4 12.42 64,436 530 12.54 100% 1% 0% 0%
8.5 Erlang HiPE #3 13.82 47,588 562 16.92 42% 56% 8% 17%
8.9 Erlang HiPE #2 14.51 44,928 512 17.78 56% 10% 12% 44%
9.2 VW Smalltalk #4 15.00 54,968 753 15.59 3% 0% 55% 46%
9.6 Pharo Smalltalk 15.55 98,340 698 15.83 100% 1% 1% 0%
10 Erlang HiPE 16.14 39,948 559 16.80 1% 96% 6% 1%
12 Java 19.98 340,192 800 21.77 2% 49% 53% 4%
14 Lisp SBCL #2 22.08 127,992 648 22.42 100% 1% 0% 0%
15 Java OpenJ9 23.60 153,064 800 34.08 36% 37% 38% 34%
15 F# .NET Core #2 23.80 63,880 701 27.22 36% 31% 29% 19%
15 Racket CS 24.54 91,712 453 24.85 0% 0% 1% 100%
15 JRuby 24.66 746,836 518 36.07 15% 61% 45% 24%
16 Free Pascal 25.23 652 3060 25.49 0% 1% 100% 0%
16 Node js #3 26.66 64,492 553 27.07 90% 0% 0% 11%
16 Racket 26.72 133,616 453 27.17 1% 100% 0% 1%
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%
335 PHP 9 min 10,480 736 9 min 100% 1% 0% 0%
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
Python 3 #2 Failed
Matz's Ruby #5 Failed
Matz's Ruby #2 Failed
JRuby #5 Failed
Swift Make Error