x64 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 | Haskell GHC #4 | 2.25 | 2.25 | 5,456 | 332 | 0% 100% 0% 3% |
| 1.0 | Ada 2005 GNAT #2 | 2.29 | 2.29 | 2,204 | 1254 | 0% 100% 0% 1% |
| 1.0 | ATS #3 | 2.29 | 2.29 | 1,188 | 1154 | 0% 0% 0% 91% |
| 1.0 | C GNU gcc #4 | 2.29 | 2.29 | 1,172 | 541 | 0% 100% 3% 1% |
| 1.0 | C++ GNU g++ #3 | 2.30 | 2.31 | 1,692 | 682 | 0% 100% 1% 0% |
| 1.1 | ATS #2 | 2.45 | 2.46 | 1,092 | 942 | 0% 0% 0% 100% |
| 1.3 | Scheme PLT #4 | 2.87 | 2.87 | 17,548 | 1131 | 99% 0% 0% 0% |
| 1.6 | ATS | 3.67 | 3.67 | 1,204 | 671 | 1% 0% 1% 100% |
| 1.7 | Pascal Free Pascal #2 | 3.84 | 3.84 | 1,156 | 785 | 1% 0% 100% 1% |
| 1.8 | C# Mono #3 | 3.93 | 3.94 | 6,476 | 1026 | 0% 0% 0% 100% |
| 5.0 | Scala #2 | 12.68 | 11.30 | 620,628 | 632 | 3% 3% 96% 9% |
| 5.7 | OCaml #2 | 12.68 | 12.69 | 3,196 | 510 | 0% 0% 100% 0% |
| 12 | Pascal Free Pascal | 27.07 | 27.08 | 896 | 3042 | 0% 0% 0% 100% |
| 13 | Scheme PLT #3 | 29.36 | 29.36 | 24,880 | 454 | 0% 0% 0% 100% |
| 18 | Java 6 -server | 41.01 | 40.56 | 222,872 | 800 | 2% 0% 0% 99% |
| 20 | C# Mono #2 | 46.53 | 45.44 | 7,744 | 856 | 0% 3% 96% 1% |
| 38 | Ada 2005 GNAT | 85.76 | 85.76 | 2,492 | 1143 | 0% 100% 0% 0% |
| 38 | F# Mono #3 | 85.87 | 85.87 | 7,012 | 984 | 1% 0% 100% 1% |
| 38 | F# Mono | 93.11 | 86.09 | 12,308 | 578 | 0% 89% 17% 0% |
| 184 | Java 6 -Xint | 6 min | 6 min | 28,608 | 800 | 1% 0% 0% 99% |
| Go 6g 8g | Make Error | 575 | ||||
| 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 |
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