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 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 programs used - sort Code B
Column × shows how many times more each program used compared to the 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 #3 | 3.71 | 3.71 | 5,440 | 331 | 100% 0% 0% 0% |
| 1.0 | C GNU gcc #4 | 3.79 | 3.79 | 1,132 | 541 | 99% 0% 0% 0% |
| 1.0 | C++ GNU g++ #3 | 3.79 | 3.79 | 1,696 | 682 | 0% 100% 0% 0% |
| 1.0 | Ada 2005 GNAT #2 | 3.79 | 3.79 | 2,192 | 1254 | 0% 100% 0% 0% |
| 1.0 | ATS #2 | 3.80 | 3.80 | 1,184 | 1008 | 100% 0% 1% 0% |
| 1.1 | Scheme PLT #4 | 4.22 | 4.22 | 16,972 | 1131 | 0% 0% 100% 0% |
| 1.4 | Lua #7 | 5.14 | 5.15 | 1,728 | 477 | 0% 0% 100% 0% |
| 1.5 | Java 6 steady state #4 | 13.49 | 5.40 | 54,236 | 1836 | 50% 57% 67% 50% |
| 1.5 | Lua #5 | 5.64 | 5.65 | 1,900 | 479 | 0% 1% 0% 100% |
| 1.6 | Java 6 -server #4 | 14.15 | 5.79 | 50,508 | 1816 | 49% 60% 52% 56% |
| 1.6 | ATS | 5.97 | 5.98 | 1,200 | 710 | 0% 0% 100% 0% |
| 1.6 | Java 6 -Xint #4 | 17.68 | 6.03 | 28,916 | 1816 | 76% 59% 64% 54% |
| 1.8 | Pascal Free Pascal #2 | 6.65 | 6.65 | 1,108 | 785 | 0% 0% 100% 0% |
| 1.8 | OCaml | 6.70 | 6.70 | 4,056 | 560 | 0% 100% 0% 0% |
| 1.8 | Java 6 steady state #2 | 6.76 | 6.75 | 39,960 | 983 | 0% 0% 0% 100% |
| 1.8 | C# Mono #3 | 6.78 | 6.78 | 6,472 | 1026 | 100% 0% 0% 0% |
| 1.9 | Java 6 -server #2 | 6.98 | 6.93 | 18,432 | 938 | 88% 12% 0% 0% |
| 1.9 | Lua | 7.00 | 7.00 | 1,840 | 522 | 0% 0% 100% 0% |
| 1.9 | Java 6 -Xint #2 | 6.99 | 7.01 | 13,584 | 938 | 0% 100% 0% 0% |
| 1.9 | Python CPython #3 | 7.16 | 7.17 | 6,508 | 476 | 100% 0% 0% 0% |
| 2.0 | PHP #2 | 7.36 | 7.36 | 15,860 | 537 | 0% 0% 100% 0% |
| 2.0 | Perl #2 | 7.46 | 7.46 | 3,868 | 385 | 100% 0% 0% 0% |
| 2.9 | Scala #2 | 12.84 | 10.87 | 622,340 | 632 | 7% 9% 93% 8% |
| 3.5 | OCaml #2 | 12.93 | 12.94 | 3,232 | 510 | 0% 100% 0% 0% |
| 4.8 | Erlang HiPE | 17.89 | 17.89 | 13,540 | 559 | 0% 0% 100% 0% |
| 5.1 | Perl | 19.08 | 19.08 | 5,496 | 452 | 0% 0% 0% 100% |
| 5.1 | Lisp SBCL #2 | 19.10 | 19.10 | 61,592 | 645 | 100% 0% 0% 0% |
| 6.3 | Go 6g 8g | 23.41 | 23.41 | 7,868 | 594 | 0% 0% 0% 100% |
| 7.4 | Ruby MRI | 27.60 | 27.60 | 14,324 | 518 | 0% 0% 100% 0% |
| 7.7 | Scheme PLT #3 | 28.69 | 28.69 | 23,244 | 454 | 0% 0% 100% 0% |
| 9.5 | Java 6 -server | 35.67 | 35.25 | 144,356 | 800 | 0% 100% 0% 1% |
| 11 | Ruby JRuby | 42.41 | 40.19 | 235,772 | 518 | 2% 1% 99% 4% |
| 13 | Pascal Free Pascal | 47.14 | 47.15 | 924 | 3042 | 0% 0% 100% 0% |
| 14 | C# Mono #2 | 57.48 | 52.26 | 7,740 | 856 | 91% 5% 7% 2% |
| 18 | Smalltalk VisualWorks | 66.15 | 66.17 | 37,740 | 899 | 0% 0% 0% 100% |
| 20 | Python CPython | 73.76 | 73.75 | 4,392 | 407 | 100% 0% 0% 0% |
| 24 | F# Mono | 88.55 | 88.55 | 11,812 | 578 | 99% 0% 0% 0% |
| 43 | Ada 2005 GNAT | 160.44 | 160.43 | 2,348 | 1143 | 0% 0% 0% 100% |
| 56 | Lua #2 | 207.34 | 207.34 | 2,340 | 1005 | 0% 0% 0% 100% |
| 67 | JavaScript V8 | 247.73 | 247.73 | 38,796 | 609 | 0% 0% 100% 0% |
| 113 | Java 6 -Xint | 7 min | 7 min | 33,392 | 800 | 0% 0% 79% 20% |
| 172 | PHP | 10 min | 10 min | 6,944 | 736 | 0% 100% 0% 0% |
| Clean #2 | Failed | 563 | ||||
| Clean | Failed | 530 | ||||
| Fortran Intel | Timed Out | 1h 00 min | 1768 | |||
| JavaScript TraceMonkey | Failed | 609 | ||||
| Ruby JRuby #2 | Failed | 653 | ||||
| Ruby MRI #2 | Failed | 653 | ||||
| Smalltalk VisualWorks #3 | Bad Output | 652 | ||||
| interesting alternative programs | ||||||
| 0.0 | Python CPython #4 | 0.06 | 0.06 | ? | 257 | |
| 0.2 | Lua #8 | 0.86 | 0.86 | 1,452 | 609 | |
| 34 | Lua #4 | 128.00 | 128.03 | 1,948 | 734 | |
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