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.66 5,152 986 2.63 100% 100% 100% 100%
1.1 Rust #4 0.71 2,644 799 0.72 0% 0% 100% 1%
1.1 Free Pascal #3 0.73 2,268 530 0.73 0% 0% 100% 0%
1.1 Intel Fortran #4 0.74 4,004 981 0.75 0% 0% 100% 1%
1.1 Chapel #2 0.76 6,504 423 0.80 100% 3% 1% 1%
1.1 Chapel #3 0.76 6,492 512 0.80 99% 3% 3% 1%
1.2 Chapel #4 0.76 6,504 512 0.81 100% 0% 4% 3%
1.2 C gcc #2 0.81 2,804 416 0.84 1% 2% 99% 1%
1.3 F# .NET #6 0.82 34,428 905 0.83 1% 2% 96% 1%
1.3 Haskell GHC #5 0.83 6,056 928 0.84 0% 99% 1% 1%
1.3 C++ g++ #5 0.87 4,224 798 0.87 0% 1% 99% 0%
1.3 Ada 2012 GNAT #2 0.88 4,704 1130 0.89 0% 0% 100% 1%
1.3 Rust #3 0.88 2,924 1366 0.90 0% 1% 100% 1%
1.3 OCaml #7 0.89 5,968 593 0.90 0% 0% 1% 100%
1.3 Rust #2 0.89 2,912 1306 0.89 0% 0% 100% 0%
1.3 C++ g++ #4 0.89 4,280 513 0.92 0% 2% 1% 100%
1.3 Rust 0.89 2,936 1420 0.88 0% 0% 0% 99%
1.3 Swift #2 0.89 9,256 600 0.91 3% 0% 0% 99%
1.4 C gcc 0.89 2,568 452 0.91 1% 1% 0% 100%
1.4 PHP #5 0.91 13,196 399 0.96 2% 0% 3% 100%
1.4 C# .NET #5 0.92 35,404 977 0.96 98% 3% 2% 1%
1.4 Java  #3 0.93 36,552 764 0.98 2% 3% 1% 99%
1.4 PHP #4 0.94 13,080 389 0.95 0% 1% 100% 0%
1.4 PHP #3 0.94 13,280 504 0.95 0% 100% 1% 0%
1.5 Julia #3 0.97 172,908 506 1.24 10% 98% 10% 9%
1.5 C# .NET #6 0.98 31,704 1168 0.99 96% 2% 1% 2%
1.5 Go #4 1.00 8,952 683 1.04 0% 3% 99% 2%
1.7 Julia #2 1.09 185,000 674 1.40 9% 87% 22% 10%
1.8 Racket #2 1.17 68,212 1136 1.18 0% 0% 1% 100%
1.9 Python 3 #3 1.28 12,024 567 1.29 0% 1% 100% 0%
2.0 Go #3 1.29 9,072 603 1.38 23% 4% 37% 43%
2.0 Node js #5 1.29 37,068 599 1.36 1% 100% 2% 2%
2.0 F# .NET #4 1.30 35,192 874 1.32 98% 2% 2% 0%
2.0 Java #2 1.34 39,252 938 1.44 4% 3% 1% 99%
2.1 C# .NET #4 1.39 31,236 1121 1.43 48% 2% 50% 2%
2.1 Go 1.39 9,684 708 1.46 2% 33% 69% 1%
2.2 PHP #2 1.44 13,764 545 1.46 100% 0% 0% 1%
2.5 Python 3 #2 1.63 10,452 386 1.64 0% 100% 1% 0%
2.5 Haskell GHC #6 1.64 7,792 360 2.06 9% 99% 7% 9%
2.6 Go #2 1.69 9,244 733 1.75 30% 27% 46% 1%
2.9 Perl #4 1.90 8,268 261 2.16 100% 2% 3% 9%
2.9 Haskell GHC #4 1.90 8,880 348 2.65 14% 13% 12% 100%
3.0 Julia 1.95 259,164 275 2.23 99% 5% 5% 6%
3.1 Perl #2 2.03 8,308 389 2.15 1% 100% 2% 3%
3.2 Ruby #5 2.11 541,320 485 4.16 53% 6% 100% 39%
3.5 Haskell GHC 2.30 8,884 460 2.88 100% 10% 8% 7%
3.5 Haskell GHC #3 2.30 9,300 379 3.24 11% 100% 12% 17%
3.5 Haskell GHC #2 2.31 8,964 585 3.04 11% 100% 10% 11%
4.0 Go #8 2.66 19,812 720 2.68 0% 1% 100% 0%
4.5 Ruby #2 2.94 266,556 658 4.27 2% 8% 36% 100%
4.8 Dart #2 3.14 43,200 500 3.19 1% 0% 99% 1%
5.0 Go #7 3.29 11,304 696 3.96 31% 29% 30% 29%
5.1 Lisp SBCL #3 3.34 607,800 493 3.38 0% 0% 100% 1%
5.8 Python 3 #4 3.85 8,836 342 3.87 0% 0% 100% 1%
6.8 Free Pascal #2 4.48 2,456 828 4.50 0% 0% 100% 0%
7.8 OCaml #5 5.14 18,988 458 5.19 0% 0% 1% 100%
8.2 Ada 2012 GNAT 5.38 4,764 1157 5.44 0% 100% 0% 1%
8.9 Lisp SBCL #2 5.88 625,188 648 5.92 0% 0% 100% 1%
9.3 Node js #4 6.14 67,700 530 6.28 1% 100% 0% 1%
11 Java 7.38 410,436 800 8.12 40% 25% 8% 37%
12 Erlang #3 7.74 51,716 562 9.23 52% 10% 49% 8%
12 Erlang 8.01 70,876 559 8.90 79% 7% 20% 5%
12 VW Smalltalk #4 8.02 55,592 753 8.04 0% 100% 0% 0%
13 Erlang #2 8.76 57,072 512 10.49 40% 31% 17% 32%
15 C# .NET #7 9.76 52,236 567 10.96 15% 30% 33% 34%
15 Perl 10.05 12,812 463 10.24 100% 0% 1% 1%
20 Node js #3 13.12 67,744 553 13.31 0% 1% 100% 0%
22 Free Pascal 14.65 656 3060 14.72 0% 0% 100% 0%
27 Ruby 17.57 166,076 518 20.03 13% 100% 1% 1%
81 Racket 53.20 67,928 453 53.92 1% 100% 0% 0%
496 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