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 Chapel #2 1.63 6,264 423 1.67 99% 2% 1% 1%
1.0 Chapel 1.63 6,244 501 1.72 99% 2% 1% 3%
1.1 Free Pascal #3 1.73 2,436 530 1.80 99% 1% 1% 2%
1.1 Intel Fortran #4 1.74 4,492 981 1.92 2% 9% 100% 0%
1.1 C gcc 1.75 2,804 452 1.77 0% 100% 0% 1%
1.1 Swift #2 1.75 8,988 600 1.79 1% 1% 100% 0%
1.1 Ada 2012 GNAT #2 1.75 4,624 1130 1.80 0% 3% 99% 0%
1.1 Rust #3 1.75 3,060 1366 1.83 2% 2% 100% 1%
1.1 Rust 1.75 3,028 1420 1.83 3% 1% 1% 100%
1.1 Rust #2 1.75 3,048 1306 1.84 1% 2% 2% 100%
1.2 F# .NET Core #6 1.88 36,020 905 1.95 2% 2% 98% 2%
1.2 C gcc #2 1.88 2,720 416 1.92 1% 100% 1% 0%
1.2 C++ g++ #4 1.89 4,460 513 1.95 2% 0% 100% 1%
1.2 Lua #5 1.94 4,056 479 2.02 2% 2% 100% 1%
1.2 Julia #3 2.03 161,260 506 2.48 6% 8% 9% 99%
1.2 C# .NET Core #5 2.03 37,336 973 2.13 3% 1% 100% 0%
1.3 Go #3 2.10 8,448 603 2.17 1% 48% 55% 0%
1.3 PHP #5 2.17 9,272 399 2.20 1% 100% 0% 0%
1.3 Julia #2 2.18 166,468 674 2.55 98% 6% 6% 6%
1.3 PHP #3 2.19 9,292 504 2.24 1% 1% 100% 0%
1.4 PHP #4 2.20 9,284 389 2.23 100% 0% 1% 0%
1.4 Racket #2 2.28 37,640 1136 2.34 1% 1% 100% 0%
1.5 Python 3 #3 2.38 12,120 567 2.44 0% 3% 1% 98%
1.8 Go 2.94 9,024 708 3.05 20% 1% 2% 81%
1.9 Lua 3.03 4,016 522 3.09 100% 0% 1% 1%
1.9 Go #2 3.04 8,856 733 3.15 52% 1% 1% 49%
1.9 Java  #2 3.07 39,320 938 3.31 2% 5% 3% 98%
1.9 F# .NET Core #4 3.08 36,992 874 3.23 71% 1% 3% 30%
1.9 C# .NET Core #4 3.08 32,832 1121 3.20 99% 1% 1% 3%
1.9 C# .NET Core #3 3.09 36,328 1026 3.23 68% 2% 1% 34%
1.9 F# .NET Core #3 3.11 38,556 909 3.25 3% 99% 3% 0%
1.9 F# .NET Core #5 3.17 42,456 865 3.28 1% 2% 99% 2%
2.0 Ruby #5 3.23 380,036 485 4.90 12% 50% 52% 37%
2.0 PHP #2 3.26 9,644 545 3.37 3% 0% 0% 100%
2.1 Python 3 #2 3.47 10,356 386 3.53 1% 1% 0% 100%
2.3 Perl #4 3.69 8,300 261 3.80 1% 1% 1% 100%
2.4 Perl #2 3.96 8,312 389 4.09 100% 1% 0% 3%
2.6 Haskell GHC #2 4.22 9,964 585 5.27 8% 100% 9% 9%
2.6 Haskell GHC #3 4.24 10,160 379 5.30 8% 100% 8% 9%
2.6 Lua #7 4.27 4,004 477 4.37 100% 0% 1% 1%
3.0 Julia 4.90 218,128 275 5.31 3% 3% 3% 99%
5.4 Ruby #2 8.78 197,868 658 12.31 20% 22% 86% 11%
6.7 Free Pascal #2 10.94 2,672 828 11.07 100% 0% 0% 1%
6.7 Ada 2012 GNAT 10.94 4,836 1157 11.08 0% 1% 0% 100%
6.8 Dart #2 11.01 110,964 500 11.62 98% 3% 4% 1%
6.8 OCaml #5 11.04 19,504 458 11.19 0% 91% 10% 0%
7.6 Lisp SBCL #3 12.37 329,212 493 12.45 100% 1% 0% 0%
7.7 Node js #4 12.47 65,228 530 12.71 19% 35% 3% 45%
9.4 VW Smalltalk #4 15.24 55,612 753 15.31 0% 66% 34% 0%
10 Erlang HiPE #3 16.28 29,064 562 20.61 18% 99% 2% 8%
10 Erlang HiPE #2 16.89 34,944 512 19.27 12% 4% 8% 90%
11 Erlang HiPE 18.12 31,884 559 18.67 1% 22% 80% 1%
12 Java 19.83 328,072 800 21.57 82% 5% 4% 18%
14 Lisp SBCL #2 22.15 333,684 648 22.33 0% 0% 100% 1%
15 F# .NET Core #2 24.03 65,588 701 27.66 36% 31% 28% 21%
15 Free Pascal 25.23 652 3060 25.49 0% 1% 100% 0%
16 Node js #3 26.70 65,352 553 27.20 88% 1% 1% 11%
17 Racket 26.93 129,128 453 27.31 8% 93% 0% 1%
17 Ruby 28.10 192,072 518 30.64 93% 3% 8% 5%
18 Matz's Ruby 29.43 18,384 518 29.65 100% 0% 0% 0%
23 F# .NET Core 38.28 80,916 513 42.91 24% 35% 35% 18%
334 PHP 9 min 10,548 736 9 min 0% 78% 23% 1%
Intel Fortran #3 Make Error
Haskell GHC #4 Make Error
Haskell GHC Make Error
Node js #5 Failed
Perl Failed
Matz's Ruby #5 Failed
Matz's Ruby #2 Failed