How big is the measured performance difference?

Each chart bar shows how many times more Time or how many times more Memory one unidentified ↓ pidigits program used, compared to the benchmark program that used least Time or the program that used least Memory.

 pidigits benchmark N=10,000

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load.

Compare how much Memory the pidigits programs used - sort Memory KB. Compare how much Code the benchmark programs used - sort Code B

Column × shows how many times more each program used compared to the benchmark program that used least.

    sort sort sort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0C++ GNU g++ #3 2.712.721,600682  100% 0% 0% 1%
1.0Ada 2005 GNAT #2 2.722.721,8761254  100% 0% 0% 0%
1.0GNU gcc #4 2.712.721,008541  1% 1% 0% 100%
1.1Haskell GHC #4 2.982.985,232332  100% 0% 0% 0%
1.9Ada 2005 GNAT 5.135.131,9921143  0% 100% 0% 0%
2.0F# Mono #3 5.305.306,012984  0% 1% 100% 0%
2.0C# Mono #3 5.305.305,7281026  0% 0% 25% 74%
6.0Scala #2 18.2516.38623,964632  12% 6% 7% 87%
7.3OCaml #2 19.8419.842,360510  0% 0% 53% 46%
7.7Erlang HiPE 20.7720.7811,392559  52% 0% 0% 48%
10Python 3 27.7927.794,556437  0% 8% 92% 0%
12Lisp SBCL #2 33.6933.6928,992645  0% 100% 0% 0%
14Pascal Free Pascal 38.5138.519123042  0% 0% 100% 0%
16Go 6g 8g 43.1143.117,712575  0% 80% 20% 1%
20Python CPython 54.7454.743,596407  100% 0% 0% 0%
21Java 6 -server 59.1858.03240,912800  34% 23% 31% 14%
23Ruby JRuby 66.0163.32211,624518  10% 18% 47% 28%
26C# Mono #2 73.4370.867,004856  4% 0% 3% 97%
45F# Mono 142.57122.6110,564578  22% 21% 41% 31%
169Java 6 -Xint 7 min7 min26,796800  15% 18% 36% 31%
250PHP 11 min11 min7,808736  60% 12% 28% 1%
ATS #3 Make Error1154
ATS #2 Make Error942
ATS Make Error671
Fortran Intel Failed1768
Haskell GHC #3 Make Error331
Java 6 -server #2 Failed938
Java 6 -server #4 Failed1816
Java 6 -Xint #2 Failed938
Java 6 -Xint #4 Failed1816
Java 6 steady state #2 Failed983
Java 6 steady state #4 Failed1836
OCaml Make Error560
Pascal Free Pascal #2 Make Error785
Perl #2 Failed385
Perl Failed452
PHP #2 Failed537
Python 3 #3 Failed520
Python CPython #3 Failed476
Ruby JRuby #2 Failed653
"interesting alternative" programs
 Python 3 #4 Failed  246
 Python CPython #4 Failed  257

 pidigits benchmark : Streaming arbitrary-precision arithmetic

diff program output N = 27 with this output file to check your program is correct before contributing.

Each program should use the same step-by-step spigot algorithm to calculate digits of Pi.

Each program should

Programs should adapt the step-by-step algorithm given on pages 4,6 & 7 of Unbounded Spigot Algorithms for the Digits of Pi (156KB pdf). (Not the deliberately obscure version given on page 2.)(Not the Rabinowitz-Wagon algorithm.)

In addition to language specific multiprecision arithmetic, we will accept programs that use GMP.

For more information see Eric W. Weisstein, "Pi Digits." From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/PiDigits.html

Revised BSD license

  Home   Flawed   Fastest   License   Help