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 manually vectorized SIMD programs.

× 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 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 Chapel #4 0.76 6,564 512 0.75 99% 1% 0% 0%
1.3 Chapel #2 0.76 6,472 423 0.78 100% 0% 1% 1%
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.5 Rust #3 0.88 2,940 1366 0.88 100% 0% 0% 0%
1.5 Rust 0.89 2,844 1420 0.90 100% 1% 0% 0%
1.5 Rust #2 0.89 3,088 1306 0.94 0% 100% 6% 0%
1.5 Swift #2 0.89 8,584 600 0.89 0% 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 #4 1.00 8,952 683 1.04 0% 3% 99% 2%
1.9 Julia #2 1.12 176,708 674 1.40 9% 99% 8% 9%
2.0 Racket #2 1.18 69,132 1136 1.20 0% 1% 100% 1%
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 Go #3 1.29 9,072 603 1.38 23% 4% 37% 43%
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 1.39 9,684 708 1.46 2% 33% 69% 1%
2.4 PHP #2 1.44 13,764 545 1.46 100% 0% 0% 1%
2.6 Julia 1.56 224,452 275 1.86 6% 99% 8% 6%
2.7 Haskell GHC #6 1.64 7,792 360 2.06 9% 99% 7% 9%
2.8 Python 3 #2 1.67 10,756 386 1.82 4% 2% 100% 3%
2.8 Go #2 1.69 9,244 733 1.75 30% 27% 46% 1%
3.2 Perl #4 1.90 8,268 261 2.16 100% 2% 3% 9%
3.2 Haskell GHC #4 1.90 8,880 348 2.65 14% 13% 12% 100%
3.4 Perl #2 2.03 8,308 389 2.15 1% 100% 2% 3%
3.6 Ruby #5 2.17 545,520 485 4.34 27% 1% 71% 100%
3.9 Haskell GHC #3 2.30 9,300 379 3.24 11% 100% 12% 17%
3.9 Haskell GHC 2.30 8,884 460 2.88 100% 10% 8% 7%
3.9 Haskell GHC #2 2.31 8,964 585 3.04 11% 100% 10% 11%
4.5 Go #8 2.66 19,812 720 2.68 0% 1% 100% 0%
4.9 Ruby #2 2.94 266,556 658 4.27 2% 8% 36% 100%
5.5 Go #7 3.29 11,304 696 3.96 31% 29% 30% 29%
5.6 Lisp SBCL #3 3.34 607,800 493 3.38 0% 0% 100% 1%
5.6 Dart #2 3.37 148,780 500 3.56 11% 33% 23% 39%
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.8 Lisp SBCL #2 5.88 625,188 648 5.92 0% 0% 100% 1%
10 Node js #4 6.14 66,508 530 6.25 1% 0% 77% 24%
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%
20 Racket 12.05 81,212 453 12.21 0% 0% 1% 100%
22 Node js #3 13.20 66,504 553 13.37 1% 0% 100% 1%
25 Free Pascal 14.65 656 3060 14.72 0% 0% 100% 0%
29 Ruby 17.57 166,076 518 20.03 13% 100% 1% 1%
546 PHP 5 min 14,496 750 5 min 0% 0% 0% 100%
Haskell GHC #5 Bad Output
Node js #5 Failed
Lua #7 Failed
Lua #5 Failed
Lua Failed
Matz's Ruby Bad Output
Matz's Ruby #2 Failed
Matz's Ruby #5 Failed