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 gcc #6 0.59 2,444 1090 2.37 100% 100% 100% 98%
1.1 C++ g++ #6 0.66 5,152 986 2.63 100% 100% 100% 100%
1.2 Rust #4 0.71 3,044 799 0.73 1% 0% 1% 100%
1.2 Free Pascal #3 0.73 2,268 530 0.73 0% 0% 100% 0%
1.2 Intel Fortran #4 0.74 4,004 981 0.75 0% 0% 100% 1%
1.3 Chapel #2 0.76 6,504 423 0.80 100% 3% 1% 1%
1.3 Chapel #3 0.76 6,492 512 0.80 99% 3% 3% 1%
1.3 Chapel #4 0.76 6,504 512 0.81 100% 0% 4% 3%
1.4 C gcc #2 0.81 2,804 416 0.84 1% 2% 99% 1%
1.4 F# .NET #6 0.82 34,428 905 0.83 1% 2% 96% 1%
1.4 Haskell GHC #5 0.83 6,056 928 0.84 0% 99% 1% 1%
1.5 C++ g++ #5 0.87 4,224 798 0.87 0% 1% 99% 0%
1.5 Ada 2012 GNAT #2 0.88 4,704 1130 0.89 0% 0% 100% 1%
1.5 Rust #3 0.88 3,272 1366 0.93 2% 1% 2% 100%
1.5 C++ g++ #4 0.89 4,280 513 0.92 0% 2% 1% 100%
1.5 Rust #2 0.89 3,252 1306 0.91 1% 0% 1% 100%
1.5 OCaml #7 0.89 5,968 593 0.90 0% 0% 1% 100%
1.5 Rust 0.89 3,252 1420 0.93 100% 1% 1% 2%
1.5 Swift #2 0.89 9,256 600 0.91 3% 0% 0% 99%
1.5 C gcc 0.89 2,568 452 0.91 1% 1% 0% 100%
1.5 PHP #5 0.91 13,196 399 0.96 2% 0% 3% 100%
1.5 C# .NET #5 0.92 35,404 977 0.96 98% 3% 2% 1%
1.6 Java  #3 0.93 36,088 764 0.97 4% 0% 1% 99%
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.6 Julia #3 0.97 172,908 506 1.24 10% 98% 10% 9%
1.6 C# .NET #6 0.98 31,704 1168 0.99 96% 2% 1% 2%
1.7 Go #4 1.00 8,808 683 1.03 2% 1% 45% 55%
1.8 Julia #2 1.09 185,000 674 1.40 9% 87% 22% 10%
2.0 Racket #2 1.18 68,656 1136 1.19 0% 100% 1% 0%
2.2 Python 3 #3 1.28 12,024 567 1.29 0% 1% 100% 0%
2.2 F# .NET #4 1.30 35,192 874 1.32 98% 2% 2% 0%
2.2 Node js #5 1.31 36,792 599 1.33 1% 0% 99% 2%
2.3 Java #2 1.34 39,496 938 1.48 2% 4% 99% 5%
2.3 C# .NET #4 1.39 31,236 1121 1.43 48% 2% 50% 2%
2.4 Go 1.40 9,408 708 1.50 1% 95% 4% 7%
2.4 PHP #2 1.44 13,764 545 1.46 100% 0% 0% 1%
2.7 Go #3 1.61 9,288 603 1.69 53% 46% 3% 2%
2.7 Python 3 #2 1.63 10,452 386 1.64 0% 100% 1% 0%
2.8 Haskell GHC #6 1.64 7,792 360 2.06 9% 99% 7% 9%
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.3 Julia 1.95 259,164 275 2.23 99% 5% 5% 6%
3.4 Perl #2 2.03 8,308 389 2.15 1% 100% 2% 3%
3.4 Go #2 2.04 9,124 733 2.10 44% 55% 2% 1%
3.5 Ruby #5 2.11 541,320 485 4.16 53% 6% 100% 39%
3.9 Haskell GHC 2.30 8,884 460 2.88 100% 10% 8% 7%
3.9 Haskell GHC #3 2.30 9,300 379 3.24 11% 100% 12% 17%
3.9 Haskell GHC #2 2.31 8,964 585 3.04 11% 100% 10% 11%
4.4 Go #8 2.59 18,540 720 2.66 1% 100% 0% 2%
4.9 Ruby #2 2.94 266,556 658 4.27 2% 8% 36% 100%
5.3 Dart #2 3.14 43,200 500 3.19 1% 0% 99% 1%
5.6 Lisp SBCL #3 3.34 607,800 493 3.38 0% 0% 100% 1%
6.5 Python 3 #4 3.85 8,836 342 3.87 0% 0% 100% 1%
7.3 Node js #4 4.32 67,296 530 4.36 0% 100% 0% 0%
7.5 Free Pascal #2 4.48 2,456 828 4.50 0% 0% 100% 0%
7.8 Node js #3 4.64 67,448 553 4.69 1% 0% 100% 0%
8.1 Go #7 4.81 10,296 696 5.52 26% 34% 28% 27%
8.7 OCaml #5 5.14 18,988 458 5.19 0% 0% 1% 100%
9.1 Ada 2012 GNAT 5.38 4,764 1157 5.44 0% 100% 0% 1%
9.9 Lisp SBCL #2 5.88 625,188 648 5.92 0% 0% 100% 1%
13 Erlang #3 7.74 51,716 562 9.23 52% 10% 49% 8%
13 Java 7.89 408,552 800 8.58 21% 37% 22% 29%
13 Erlang 8.01 70,876 559 8.90 79% 7% 20% 5%
14 VW Smalltalk #4 8.02 55,592 753 8.04 0% 100% 0% 0%
15 Erlang #2 8.76 57,072 512 10.49 40% 31% 17% 32%
16 C# .NET #7 9.76 52,236 567 10.96 15% 30% 33% 34%
17 Perl 10.05 12,812 463 10.24 100% 0% 1% 1%
25 Free Pascal 14.65 656 3060 14.72 0% 0% 100% 0%
30 Ruby 17.57 166,076 518 20.03 13% 100% 1% 1%
90 Racket 53.35 68,296 453 53.70 0% 0% 100% 0%
550 PHP 5 min 14,496 750 5 min 0% 0% 0% 100%
Lua #7 Failed
Lua #5 Failed
Lua Failed
Matz's Ruby Bad Output
Matz's Ruby #2 Failed
Matz's Ruby #5 Failed