Ubuntu : Intel® Q6600® quad-core |
↓ Streaming arbitrary-precision arithmetic, N=10,000.
Which programs used least Code? Which programs use highly optimised assembly code libraries? Which programs make use of all the processor cores?
| sort | sort | sort | sort | |||
|---|---|---|---|---|---|---|
| × | Program & Logs | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
| 1.0 | C GNU gcc #4 | 2.71 | 2.71 | 1,012 | 541 | 0% 100% 0% 0% |
| 1.0 | C++ GNU g++ #3 | 2.71 | 2.71 | 1,600 | 682 | 0% 0% 0% 100% |
| 1.3 | ATS #2 | 3.48 | 3.48 | 1,076 | 1008 | 1% 100% 0% 0% |
| 1.4 | Ada 2005 GNAT #2 | 3.75 | 3.76 | 1,852 | 1254 | 0% 0% 0% 100% |
| 1.4 | Haskell GHC #3 | 3.77 | 3.78 | 5,192 | 331 | 0% 0% 1% 100% |
| 1.4 | Lua LuaJIT #5 | 3.84 | 3.84 | 1,548 | 479 | 0% 0% 0% 100% |
| 1.4 | Lua #5 | 3.88 | 3.88 | 1,772 | 479 | 100% 0% 0% 0% |
| 1.7 | Java 6 steady state #4 | 11.70 | 4.55 | 29,428 | 1836 | 60% 56% 57% 57% |
| 1.8 | ATS | 4.94 | 4.95 | 1,200 | 710 | 1% 0% 100% 0% |
| 1.8 | Java 6 -server #4 | 12.95 | 5.00 | 28,624 | 1816 | 61% 59% 57% 55% |
| 1.9 | Java 6 steady state #2 | 5.28 | 5.28 | 32,696 | 983 | 1% 48% 52% 0% |
| 2.0 | Lua LuaJIT | 5.33 | 5.33 | 1,520 | 522 | 0% 100% 0% 0% |
| 2.0 | Lua | 5.37 | 5.38 | 1,656 | 522 | 0% 100% 0% 0% |
| 2.0 | Java 6 -server #2 | 5.49 | 5.41 | 15,164 | 938 | 1% 1% 99% 1% |
| 2.0 | Lua LuaJIT #7 | 5.48 | 5.48 | 1,396 | 477 | 0% 0% 100% 0% |
| 2.0 | Lua #7 | 5.51 | 5.51 | 1,564 | 477 | 0% 0% 100% 0% |
| 2.0 | Java 6 -Xint #2 | 5.52 | 5.52 | 11,604 | 938 | 0% 0% 0% 100% |
| 2.0 | Java 6 -Xint #4 | 16.45 | 5.53 | 16,080 | 1816 | 64% 51% 51% 94% |
| 2.1 | Scheme PLT #4 | 5.60 | 5.61 | 12,316 | 1131 | 0% 0% 0% 100% |
| 2.4 | Pascal Free Pascal #2 | 6.59 | 6.59 | 1,060 | 785 | 18% 100% 13% 22% |
| 2.4 | Ada 2005 GNAT | 6.59 | 6.59 | 1,972 | 1143 | 0% 100% 0% 0% |
| 2.5 | C# Mono #3 | 6.78 | 6.78 | 5,528 | 1026 | 0% 100% 0% 0% |
| 2.6 | Perl #2 | 7.03 | 7.03 | 3,284 | 385 | 0% 0% 0% 100% |
| 2.7 | Python CPython #3 | 7.40 | 7.40 | 5,528 | 476 | 0% 0% 100% 0% |
| 2.8 | PHP #2 | 7.62 | 7.62 | 8,524 | 537 | 0% 0% 0% 100% |
| 5.1 | Clean #2 | 13.73 | 13.73 | 2,848 | 563 | 0% 0% 0% 100% |
| 6.6 | Scala #2 | 20.07 | 17.76 | 383,612 | 632 | 5% 5% 10% 93% |
| 7.0 | Perl | 19.08 | 19.08 | 4,284 | 452 | 100% 0% 0% 0% |
| 7.6 | Erlang HiPE | 20.50 | 20.51 | 11,132 | 559 | 0% 0% 0% 100% |
| 7.8 | OCaml #2 | 21.02 | 21.02 | 2,372 | 510 | 0% 100% 0% 0% |
| 10 | Mozart/Oz | 28.18 | 28.18 | 8,600 | 547 | 0% 0% 100% 0% |
| 12 | Lisp SBCL #2 | 33.65 | 33.65 | 29,084 | 645 | 0% 0% 0% 100% |
| 13 | Python 3 | 36.57 | 36.57 | 4,620 | 437 | 0% 0% 100% 0% |
| 14 | Pascal Free Pascal | 39.01 | 39.00 | 868 | 3042 | 0% 0% 100% 0% |
| 15 | Lua LuaJIT #2 | 40.80 | 40.79 | 1,592 | 1005 | 0% 100% 0% 0% |
| 17 | Scheme PLT #3 | 46.10 | 46.10 | 17,408 | 454 | 0% 100% 0% 0% |
| 20 | Ruby MRI | 53.81 | 53.81 | 13,924 | 518 | 0% 0% 0% 100% |
| 21 | Smalltalk VisualWorks | 56.88 | 56.88 | 32,936 | 899 | 0% 0% 0% 100% |
| 22 | Java 6 -server | 60.76 | 60.31 | 112,132 | 800 | 1% 67% 32% 1% |
| 23 | Python CPython | 61.44 | 61.44 | 3,600 | 407 | 0% 0% 0% 100% |
| 25 | Ruby JRuby | 69.70 | 67.36 | 101,248 | 518 | 2% 1% 99% 2% |
| 25 | C# Mono #2 | 67.72 | 67.73 | 6,868 | 856 | 0% 91% 9% 0% |
| 25 | Ruby 1.9 | 68.17 | 68.14 | 13,416 | 518 | 0% 0% 0% 100% |
| 49 | F# Mono | 133.25 | 133.82 | 10,244 | 578 | 0% 0% 0% 99% |
| 87 | JavaScript V8 | 234.80 | 234.79 | 21,172 | 609 | 0% 0% 0% 100% |
| 93 | Lua #2 | 252.91 | 252.90 | 1,936 | 1005 | 59% 0% 0% 41% |
| 173 | Java 6 -Xint | 7 min | 7 min | 17,424 | 800 | 0% 0% 100% 0% |
| 268 | PHP | 12 min | 12 min | 6,300 | 736 | 0% 0% 100% 0% |
| 1,592 | JavaScript TraceMonkey | 1h 11 min | 1h 11 min | 61,700 | 609 | 3% 17% 0% 81% |
| Clean | Bad Output | 530 | ||||
| Fortran Intel | Failed | 1768 | ||||
| Go 6g 8g | Failed | 594 | ||||
| Lisaac | Make Error | 928 | ||||
| OCaml | Make Error | 560 | ||||
| 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 CPython #4 | 0.08 | 0.00 | ? | 257 | ||
| Python 3 #4 | Failed | 263 | ||||
| 0.4 | Lua LuaJIT #8 | 0.99 | 0.99 | 1,284 | 609 | |
| 0.4 | Lua #8 | 1.02 | 1.02 | 1,444 | 609 | |
| 7.5 | Lua LuaJIT #4 | 20.25 | 20.25 | 1,368 | 734 | |
| 56 | Lua #4 | 152.07 | 152.08 | 1,552 | 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