Ubuntu : Intel® Q6600® quad-core |
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.
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.0 | C++ GNU g++ #3 | 2.71 | 2.72 | 1,600 | 682 | 100% 0% 0% 1% |
| 1.0 | Ada 2005 GNAT #2 | 2.72 | 2.72 | 1,876 | 1254 | 100% 0% 0% 0% |
| 1.0 | C GNU gcc #4 | 2.71 | 2.72 | 1,008 | 541 | 1% 1% 0% 100% |
| 1.1 | Haskell GHC #4 | 2.98 | 2.98 | 5,232 | 332 | 100% 0% 0% 0% |
| 1.9 | Ada 2005 GNAT | 5.13 | 5.13 | 1,992 | 1143 | 0% 100% 0% 0% |
| 2.0 | F# Mono #3 | 5.30 | 5.30 | 6,012 | 984 | 0% 1% 100% 0% |
| 2.0 | C# Mono #3 | 5.30 | 5.30 | 5,728 | 1026 | 0% 0% 25% 74% |
| 6.0 | Scala #2 | 18.25 | 16.38 | 623,964 | 632 | 12% 6% 7% 87% |
| 7.3 | OCaml #2 | 19.84 | 19.84 | 2,360 | 510 | 0% 0% 53% 46% |
| 7.7 | Erlang HiPE | 20.77 | 20.78 | 11,392 | 559 | 52% 0% 0% 48% |
| 10 | Python 3 | 27.79 | 27.79 | 4,556 | 437 | 0% 8% 92% 0% |
| 12 | Lisp SBCL #2 | 33.69 | 33.69 | 28,992 | 645 | 0% 100% 0% 0% |
| 14 | Pascal Free Pascal | 38.51 | 38.51 | 912 | 3042 | 0% 0% 100% 0% |
| 16 | Go 6g 8g | 43.11 | 43.11 | 7,712 | 575 | 0% 80% 20% 1% |
| 20 | Python CPython | 54.74 | 54.74 | 3,596 | 407 | 100% 0% 0% 0% |
| 21 | Java 6 -server | 59.18 | 58.03 | 240,912 | 800 | 34% 23% 31% 14% |
| 23 | Ruby JRuby | 66.01 | 63.32 | 211,624 | 518 | 10% 18% 47% 28% |
| 26 | C# Mono #2 | 73.43 | 70.86 | 7,004 | 856 | 4% 0% 3% 97% |
| 45 | F# Mono | 142.57 | 122.61 | 10,564 | 578 | 22% 21% 41% 31% |
| 169 | Java 6 -Xint | 7 min | 7 min | 26,796 | 800 | 15% 18% 36% 31% |
| 250 | PHP | 11 min | 11 min | 7,808 | 736 | 60% 12% 28% 1% |
| ATS #3 | Make Error | 1154 | ||||
| ATS #2 | Make Error | 942 | ||||
| ATS | Make Error | 671 | ||||
| Fortran Intel | Failed | 1768 | ||||
| Haskell GHC #3 | Make Error | 331 | ||||
| Java 6 -server #2 | Failed | 938 | ||||
| Java 6 -server #4 | Failed | 1816 | ||||
| Java 6 -Xint #2 | Failed | 938 | ||||
| Java 6 -Xint #4 | Failed | 1816 | ||||
| Java 6 steady state #2 | Failed | 983 | ||||
| Java 6 steady state #4 | Failed | 1836 | ||||
| OCaml | Make Error | 560 | ||||
| Pascal Free Pascal #2 | Make Error | 785 | ||||
| Perl #2 | Failed | 385 | ||||
| Perl | Failed | 452 | ||||
| PHP #2 | Failed | 537 | ||||
| Python 3 #3 | Failed | 520 | ||||
| Python CPython #3 | Failed | 476 | ||||
| Ruby JRuby #2 | Failed | 653 | ||||
| "interesting alternative" programs | ||||||
| Python 3 #4 | Failed | 246 | ||||
| Python CPython #4 | Failed | 257 | ||||
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