The Computer Language
Benchmarks Game

pidigits

Always look at the source code.

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.

× source secs mem gz busy cpu load
1.0 C++ g++ #6 0.60 4,944 986 2.38 100% 100% 98% 100%
1.2 C++ g++ #4 0.71 4,176 513 0.76 6% 0% 100% 1%
1.2 C++ g++ #5 0.72 4,196 798 0.77 1% 0% 100% 6%
1.2 C gcc #2 0.73 2,848 416 0.75 1% 100% 1% 0%
1.2 Free Pascal #3 0.73 2,268 530 0.73 0% 0% 100% 0%
1.2 Ada 2012 GNAT #2 0.74 4,596 1130 0.75 1% 0% 0% 100%
1.2 Intel Fortran #4 0.74 4,004 981 0.75 0% 0% 100% 1%
1.2 C gcc 0.74 2,564 452 0.77 100% 0% 0% 4%
1.2 Rust 0.74 2,888 1420 0.76 0% 0% 100% 3%
1.2 Rust #3 0.74 2,892 1366 0.77 0% 0% 100% 4%
1.2 Rust #2 0.74 2,888 1306 0.78 0% 1% 100% 4%
1.2 OCaml #7 0.74 6,144 593 0.78 0% 0% 100% 4%
1.3 Chapel #3 0.75 6,516 512 0.75 99% 1% 0% 0%
1.3 Haskell GHC #5 0.75 5,992 1694 0.76 0% 0% 1% 100%
1.3 Swift #2 0.76 8,428 600 0.82 100% 3% 1% 4%
1.3 Chapel #2 0.76 6,472 423 0.78 100% 0% 1% 1%
1.3 Chapel #4 0.76 6,564 512 0.75 99% 1% 0% 0%
1.3 Java  #3 0.79 35,568 764 0.84 99% 3% 3% 1%
1.4 F# .NET #6 0.82 34,428 905 0.83 1% 2% 96% 1%
1.4 C# .NET #6 0.83 31,700 1168 1.02 1% 2% 21% 98%
1.4 C# .NET #5 0.84 34,948 973 0.85 98% 1% 1% 1%
1.4 Go #4 0.86 8,980 683 0.88 2% 0% 0% 100%
1.5 PHP #5 0.91 13,196 399 0.96 2% 0% 3% 100%
1.6 PHP #4 0.94 13,080 389 0.95 0% 1% 100% 0%
1.6 PHP #3 0.94 13,280 504 0.95 0% 100% 1% 0%
1.7 Julia #3 1.00 168,088 506 1.31 11% 99% 11% 10%
1.7 Go #3 1.00 9,112 603 1.03 47% 0% 53% 2%
1.7 Racket #2 1.02 36,924 1136 1.04 99% 3% 0% 0%
1.9 Julia #2 1.12 176,708 674 1.40 9% 99% 8% 9%
1.9 Node js #5 1.16 34,980 599 1.21 1% 1% 99% 3%
2.0 Go 1.22 10,960 708 1.30 2% 2% 100% 2%
2.1 Python 3 #3 1.28 12,336 567 1.30 1% 0% 1% 100%
2.2 Java #2 1.29 38,736 938 1.37 5% 2% 98% 1%
2.2 F# .NET #4 1.30 35,192 874 1.32 98% 2% 2% 0%
2.2 C# .NET #4 1.31 31,240 1121 1.32 98% 2% 1% 0%
2.3 Go #2 1.40 9,464 733 1.41 1% 50% 0% 50%
2.4 PHP #2 1.44 13,764 545 1.46 100% 0% 0% 1%
2.6 Haskell GHC #6 1.55 8,260 360 2.06 12% 99% 10% 12%
2.6 Julia 1.56 224,452 275 1.86 6% 99% 8% 6%
2.8 Python 3 #2 1.67 10,756 386 1.82 4% 2% 100% 3%
3.0 Haskell GHC #4 1.78 9,224 348 2.45 11% 10% 18% 99%
3.2 Perl #4 1.90 8,268 261 2.16 100% 2% 3% 9%
3.4 Ruby #5 2.01 437,692 485 4.06 49% 10% 100% 42%
3.4 Perl #2 2.03 8,308 389 2.15 1% 100% 2% 3%
3.6 Haskell GHC #3 2.14 10,004 379 2.90 12% 13% 100% 12%
3.6 Haskell GHC 2.17 10,012 460 2.88 100% 10% 11% 11%
3.7 Haskell GHC #2 2.19 9,432 585 3.03 12% 14% 100% 13%
4.5 Go #8 2.68 18,748 720 2.94 9% 0% 100% 1%
5.2 Lisp SBCL #3 3.13 131,536 493 3.14 0% 0% 0% 100%
5.5 Go #7 3.30 11,408 696 3.78 28% 28% 26% 33%
5.6 Dart #2 3.33 149,912 500 3.56 4% 19% 2% 81%
6.4 Python 3 #4 3.85 9,120 342 3.87 1% 0% 100% 0%
7.3 OCaml #5 4.36 19,200 458 4.40 0% 100% 0% 0%
7.5 Free Pascal #2 4.48 2,456 828 4.50 0% 0% 100% 0%
7.5 Ada 2012 GNAT 4.49 4,584 1157 4.62 100% 0% 1% 2%
9.6 Lisp SBCL #2 5.77 142,476 648 5.81 1% 0% 0% 100%
10 Node js #4 6.15 65,112 530 6.26 1% 100% 1% 0%
13 Java 7.61 518,172 800 8.42 19% 31% 31% 30%
13 Erlang HiPE #3 7.94 28,088 562 8.34 8% 88% 2% 7%
13 VW Smalltalk #4 8.02 55,592 753 8.04 0% 100% 0% 0%
14 Erlang HiPE #2 8.52 32,984 512 10.90 17% 9% 15% 87%
15 Erlang HiPE 8.79 33,784 559 8.99 1% 87% 14% 1%
17 Perl 10.05 12,812 463 10.24 100% 0% 1% 1%
19 Racket 11.40 128,476 453 11.62 1% 1% 100% 1%
22 Node js #3 13.24 65,360 553 13.41 100% 0% 0% 0%
25 Free Pascal 14.65 656 3060 14.72 0% 0% 100% 0%
29 Ruby 17.10 179,728 518 21.08 13% 7% 11% 92%
546 PHP 5 min 14,496 750 5 min 0% 0% 0% 100%
Lua #5 Failed
Lua Failed
Lua #7 Failed
Ruby #2 Failed
Matz's Ruby #5 Failed
Matz's Ruby Bad Output
Matz's Ruby #2 Failed