Ubuntu : Intel® Q6600® one 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 | C GNU gcc #4 | 2.71 | 2.71 | 1,008 | 541 | 0% 0% 0% 100% |
| 1.0 | C++ GNU g++ #3 | 2.71 | 2.71 | 1,596 | 682 | 0% 0% 1% 100% |
| 1.3 | ATS #2 | 3.48 | 3.47 | 1,076 | 1008 | 0% 0% 0% 100% |
| 1.4 | Ada 2005 GNAT #2 | 3.75 | 3.75 | 1,852 | 1254 | 0% 0% 0% 100% |
| 1.4 | Haskell GHC #3 | 3.78 | 3.78 | 5,192 | 331 | 0% 0% 1% 100% |
| 1.4 | Lua LuaJIT #5 | 3.83 | 3.84 | 1,572 | 479 | 0% 0% 0% 100% |
| 1.4 | Lua #5 | 3.87 | 3.87 | 1,776 | 479 | 0% 0% 0% 100% |
| 1.8 | ATS | 4.95 | 4.95 | 1,200 | 710 | 0% 0% 0% 100% |
| 2.0 | C# Mono #3 | 5.30 | 5.31 | 5,672 | 1026 | 0% 0% 0% 100% |
| 2.0 | Java 6 steady state #2 | 5.31 | 5.31 | 31,868 | 983 | 0% 0% 1% 100% |
| 2.0 | Lua LuaJIT | 5.33 | 5.33 | 1,552 | 522 | 0% 0% 0% 100% |
| 2.0 | Lua | 5.38 | 5.38 | 1,656 | 522 | 0% 0% 0% 100% |
| 2.0 | Java 6 -server #2 | 5.47 | 5.47 | 14,828 | 938 | 1% 3% 0% 100% |
| 2.0 | Lua LuaJIT #7 | 5.47 | 5.47 | 1,424 | 477 | 0% 0% 0% 100% |
| 2.0 | Lua #7 | 5.51 | 5.51 | 1,564 | 477 | 0% 0% 0% 100% |
| 2.1 | Java 6 -Xint #2 | 5.52 | 5.56 | 11,584 | 938 | 0% 0% 0% 99% |
| 2.1 | Scheme PLT #4 | 5.58 | 5.58 | 12,308 | 1131 | 0% 0% 0% 100% |
| 2.4 | Java 6 steady state #4 | 6.40 | 6.40 | 28,304 | 1836 | 0% 0% 0% 100% |
| 2.4 | Pascal Free Pascal #2 | 6.57 | 6.57 | 1,060 | 785 | 0% 0% 0% 100% |
| 2.4 | Ada 2005 GNAT | 6.59 | 6.59 | 1,972 | 1143 | 0% 0% 0% 100% |
| 2.4 | OCaml | 6.63 | 6.63 | 2,744 | 560 | 0% 0% 0% 100% |
| 2.6 | Perl #2 | 7.04 | 7.05 | 3,284 | 385 | 0% 0% 0% 100% |
| 2.6 | Java 6 -server #4 | 7.11 | 7.13 | 27,188 | 1816 | 0% 0% 0% 100% |
| 2.7 | Python CPython #3 | 7.40 | 7.40 | 5,528 | 476 | 0% 0% 0% 100% |
| 2.8 | PHP #2 | 7.63 | 7.63 | 8,564 | 537 | 0% 0% 0% 100% |
| 5.1 | Clean #2 | 13.71 | 13.71 | 2,852 | 563 | 0% 0% 0% 100% |
| 6.7 | Scala #2 | 18.07 | 18.09 | 382,336 | 632 | 0% 0% 0% 100% |
| 7.0 | Java 6 -Xint #4 | 18.82 | 18.85 | 16,156 | 1816 | 0% 0% 0% 100% |
| 7.0 | Perl | 18.99 | 18.99 | 4,264 | 452 | 0% 0% 0% 100% |
| 7.5 | Erlang HiPE | 20.41 | 20.41 | 10,108 | 559 | 0% 0% 100% 0% |
| 10 | Mozart/Oz | 28.20 | 28.20 | 8,532 | 547 | 0% 0% 0% 100% |
| 12 | Lisp SBCL #2 | 33.63 | 33.63 | 29,076 | 645 | 0% 0% 0% 100% |
| 13 | Python 3 | 36.57 | 36.57 | 4,620 | 437 | 0% 0% 0% 100% |
| 14 | Pascal Free Pascal | 38.97 | 38.97 | 868 | 3042 | 0% 0% 0% 100% |
| 15 | Lua LuaJIT #2 | 41.15 | 41.15 | 1,624 | 1005 | 0% 0% 0% 100% |
| 16 | Go 6g 8g | 43.29 | 43.29 | 7,696 | 594 | 0% 0% 0% 100% |
| 17 | Scheme PLT #3 | 46.19 | 46.19 | 17,064 | 454 | 0% 0% 0% 100% |
| 20 | Ruby MRI | 53.84 | 53.84 | 13,924 | 518 | 0% 0% 0% 100% |
| 21 | Smalltalk VisualWorks | 56.84 | 56.84 | 32,936 | 899 | 0% 0% 0% 100% |
| 22 | Java 6 -server | 60.66 | 60.69 | 58,612 | 800 | 0% 0% 0% 100% |
| 23 | Python CPython | 61.43 | 61.43 | 3,592 | 407 | 0% 0% 0% 100% |
| 25 | C# Mono #2 | 68.44 | 68.44 | 7,008 | 856 | 0% 0% 0% 100% |
| 25 | Ruby JRuby | 69.04 | 69.05 | 91,068 | 518 | 0% 0% 0% 100% |
| 27 | Ruby 1.9 | 73.25 | 73.25 | 13,156 | 518 | 0% 0% 0% 100% |
| 46 | F# Mono | 124.31 | 124.31 | 10,296 | 578 | 0% 0% 0% 100% |
| 87 | JavaScript V8 | 235.04 | 235.04 | 21,172 | 609 | 0% 0% 0% 100% |
| 93 | Lua #2 | 253.20 | 253.19 | 1,932 | 1005 | 0% 0% 0% 100% |
| 156 | Java 6 -Xint | 7 min | 7 min | 18,452 | 800 | 0% 0% 0% 100% |
| 267 | PHP | 12 min | 12 min | 6,048 | 736 | 0% 0% 0% 100% |
| 1,586 | JavaScript TraceMonkey | 1h 11 min | 1h 11 min | 61,840 | 609 | 0% 0% 0% 100% |
| Clean | Bad Output | 530 | ||||
| Fortran Intel | Failed | 1768 | ||||
| Lisaac | Make Error | 928 | ||||
| OCaml #2 | Make Error | 510 | ||||
| Python 3 #3 | Failed | 512 | ||||
| Ruby 1.9 #2 | Failed | 653 | ||||
| Ruby JRuby #2 | Failed | 653 | ||||
| Ruby MRI #2 | Failed | 653 | ||||
| Smalltalk VisualWorks #3 | Failed | 652 | ||||
| interesting alternative programs | ||||||
| Python 3 #4 | Failed | 263 | ||||
| 0.0 | Python CPython #4 | 0.05 | 0.05 | ? | 257 | |
| 0.4 | Lua LuaJIT #8 | 0.99 | 0.99 | 1,296 | 609 | |
| 0.4 | Lua #8 | 1.03 | 1.03 | 1,428 | 609 | |
| 7.4 | Lua LuaJIT #4 | 20.10 | 20.10 | 1,400 | 734 | |
| 56 | Lua #4 | 152.03 | 152.03 | 1,544 | 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