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 #4 0.76 6,224 512 0.77 100% 0% 0% 1%
1.0 Chapel #3 0.76 6,192 512 0.81 100% 1% 1% 4%
1.0 Chapel #2 0.76 6,172 423 0.80 100% 1% 0% 3%
1.1 C gcc #2 0.81 2,664 416 0.84 1% 0% 100% 2%
1.1 Free Pascal #3 0.87 2,020 530 0.88 100% 1% 0% 0%
1.1 Ada 2012 GNAT #2 0.87 4,512 1130 0.90 0% 1% 100% 2%
1.2 Intel Fortran #4 0.88 3,972 981 0.90 100% 2% 0% 0%
1.2 Rust #2 0.88 2,884 1306 0.89 1% 0% 0% 100%
1.2 Rust 0.88 2,880 1420 0.90 1% 0% 100% 1%
1.2 Rust #3 0.88 2,928 1366 0.89 1% 0% 0% 100%
1.2 C gcc 0.88 2,660 452 0.93 1% 100% 1% 3%
1.2 C++ g++ #4 0.89 4,236 513 0.89 0% 0% 100% 0%
1.2 Swift #2 0.89 8,484 600 0.90 0% 100% 1% 0%
1.2 Haskell GHC #5 0.89 6,048 1694 0.90 0% 100% 1% 0%
1.2 C# .NET Core #5 0.93 34,720 973 1.11 4% 5% 95% 14%
1.2 Java  #3 0.94 36,644 764 1.07 98% 5% 2% 9%
1.3 C# .NET Core #6 0.96 30,928 1168 0.97 96% 1% 3% 1%
1.3 F# .NET Core #6 0.97 34,372 905 0.98 1% 96% 1% 3%
1.3 PHP #5 0.99 9,116 399 1.01 1% 0% 1% 100%
1.3 PHP #3 1.00 9,076 504 1.02 1% 1% 99% 1%
1.3 PHP #4 1.00 9,112 389 1.02 0% 99% 1% 2%
1.3 Julia #3 1.02 169,512 506 1.30 9% 9% 99% 11%
1.4 Julia #2 1.10 174,244 674 1.38 8% 99% 8% 10%
1.5 Racket #2 1.16 36,556 1136 1.21 0% 3% 99% 3%
1.6 Go #3 1.23 8,580 603 1.26 1% 50% 2% 50%
1.7 Python 3 #3 1.29 11,976 567 1.30 0% 100% 1% 0%
1.7 Node js #5 1.32 36,176 599 1.50 3% 2% 8% 100%
1.8 Java #2 1.35 39,744 938 1.43 2% 97% 5% 1%
1.8 F# .NET Core #4 1.37 35,468 874 1.43 4% 4% 97% 0%
1.8 Go 1.38 9,712 708 1.51 2% 11% 95% 1%
1.8 C# .NET Core #4 1.39 30,336 1121 1.42 96% 1% 3% 2%
1.8 Ruby #5 1.41 303,640 485 2.50 39% 30% 10% 99%
1.9 PHP #2 1.44 9,400 545 1.52 1% 100% 1% 3%
2.0 Python 3 #2 1.56 10,352 386 1.60 1% 1% 100% 1%
2.1 Julia 1.63 228,532 275 2.02 99% 13% 6% 6%
2.2 Haskell GHC #6 1.67 8,204 360 2.08 8% 8% 100% 8%
2.2 Go #2 1.68 8,984 733 1.70 1% 49% 51% 1%
2.5 Perl #4 1.89 8,344 261 1.90 100% 1% 0% 0%
2.5 Haskell GHC #4 1.93 9,212 348 2.56 11% 10% 99% 12%
2.7 Perl #2 2.03 8,236 389 2.07 1% 100% 1% 0%
3.1 Haskell GHC #2 2.34 9,756 585 3.07 10% 10% 100% 12%
3.1 Haskell GHC #3 2.35 9,568 379 2.98 8% 9% 100% 9%
3.1 Haskell GHC 2.36 8,908 460 3.07 9% 10% 100% 11%
4.0 Ruby #2 3.07 190,172 658 5.32 31% 29% 100% 13%
4.2 Lisp SBCL #3 3.22 424,508 493 3.24 0% 100% 1% 0%
4.4 Dart #2 3.33 149,040 500 3.60 5% 4% 4% 95%
5.1 Python 3 #4 3.86 8,896 342 3.87 0% 100% 0% 0%
5.8 OCaml #5 4.44 19,152 458 4.57 23% 79% 0% 1%
7.0 Free Pascal #2 5.34 2,464 828 5.35 0% 0% 0% 100%
7.0 Ada 2012 GNAT 5.35 4,600 1157 5.37 100% 0% 0% 0%
7.6 Lisp SBCL #2 5.76 424,180 648 5.87 0% 1% 100% 1%
8.1 Node js #4 6.17 64,532 530 6.26 0% 4% 22% 75%
9.5 VW Smalltalk #4 7.22 54,952 753 7.22 0% 0% 100% 0%
10 Java 7.79 459,168 800 8.61 16% 21% 39% 35%
10 Erlang HiPE #3 7.89 28,324 562 8.51 2% 3% 96% 6%
11 Erlang HiPE #2 8.41 33,836 512 11.28 6% 23% 10% 96%
12 Erlang HiPE 8.78 30,548 559 8.95 1% 0% 0% 100%
13 Perl 9.98 12,800 463 10.01 0% 0% 0% 100%
15 Racket 11.11 130,900 453 11.48 1% 2% 70% 31%
17 Node js #3 13.29 64,496 553 13.45 35% 15% 39% 13%
19 Free Pascal 14.62 656 3060 14.74 0% 0% 100% 0%
23 Ruby 17.15 191,316 518 18.80 5% 95% 2% 7%
428 PHP 5 min 10,432 736 5 min 0% 9% 82% 9%
Lua Failed
Lua #5 Failed
Lua #7 Failed
Matz's Ruby #5 Failed
Matz's Ruby Bad Output
Matz's Ruby #2 Failed