pidigits benchmark hypotheses non fingo

↓ 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.0GNU gcc #4 2.712.711,012541  0% 100% 0% 0%
1.0C++ GNU g++ #3 2.712.711,600682  0% 0% 0% 100%
1.3ATS #2 3.483.481,0761008  1% 100% 0% 0%
1.4Ada 2005 GNAT #2 3.753.761,8521254  0% 0% 0% 100%
1.4Haskell GHC #3 3.773.785,192331  0% 0% 1% 100%
1.4Lua LuaJIT #5 3.843.841,548479  0% 0% 0% 100%
1.4Lua #5 3.883.881,772479  100% 0% 0% 0%
1.7Java 6 steady state #4 11.704.5529,4281836  60% 56% 57% 57%
1.8ATS 4.944.951,200710  1% 0% 100% 0%
1.8Java 6 -server #4 12.955.0028,6241816  61% 59% 57% 55%
1.9Java 6 steady state #2 5.285.2832,696983  1% 48% 52% 0%
2.0Lua LuaJIT 5.335.331,520522  0% 100% 0% 0%
2.0Lua 5.375.381,656522  0% 100% 0% 0%
2.0Java 6 -server #2 5.495.4115,164938  1% 1% 99% 1%
2.0Lua LuaJIT #7 5.485.481,396477  0% 0% 100% 0%
2.0Lua #7 5.515.511,564477  0% 0% 100% 0%
2.0Java 6 -Xint #2 5.525.5211,604938  0% 0% 0% 100%
2.0Java 6 -Xint #4 16.455.5316,0801816  64% 51% 51% 94%
2.1Scheme PLT #4 5.605.6112,3161131  0% 0% 0% 100%
2.4Pascal Free Pascal #2 6.596.591,060785  18% 100% 13% 22%
2.4Ada 2005 GNAT 6.596.591,9721143  0% 100% 0% 0%
2.5C# Mono #3 6.786.785,5281026  0% 100% 0% 0%
2.6Perl #2 7.037.033,284385  0% 0% 0% 100%
2.7Python CPython #3 7.407.405,528476  0% 0% 100% 0%
2.8PHP #2 7.627.628,524537  0% 0% 0% 100%
5.1Clean #2 13.7313.732,848563  0% 0% 0% 100%
6.6Scala #2 20.0717.76383,612632  5% 5% 10% 93%
7.0Perl 19.0819.084,284452  100% 0% 0% 0%
7.6Erlang HiPE 20.5020.5111,132559  0% 0% 0% 100%
7.8OCaml #2 21.0221.022,372510  0% 100% 0% 0%
10Mozart/Oz 28.1828.188,600547  0% 0% 100% 0%
12Lisp SBCL #2 33.6533.6529,084645  0% 0% 0% 100%
13Python 3 36.5736.574,620437  0% 0% 100% 0%
14Pascal Free Pascal 39.0139.008683042  0% 0% 100% 0%
15Lua LuaJIT #2 40.8040.791,5921005  0% 100% 0% 0%
17Scheme PLT #3 46.1046.1017,408454  0% 100% 0% 0%
20Ruby MRI 53.8153.8113,924518  0% 0% 0% 100%
21Smalltalk VisualWorks 56.8856.8832,936899  0% 0% 0% 100%
22Java 6 -server 60.7660.31112,132800  1% 67% 32% 1%
23Python CPython 61.4461.443,600407  0% 0% 0% 100%
25Ruby JRuby 69.7067.36101,248518  2% 1% 99% 2%
25C# Mono #2 67.7267.736,868856  0% 91% 9% 0%
25Ruby 1.9 68.1768.1413,416518  0% 0% 0% 100%
49F# Mono 133.25133.8210,244578  0% 0% 0% 99%
87JavaScript V8 234.80234.7921,172609  0% 0% 0% 100%
93Lua #2 252.91252.901,9361005  59% 0% 0% 41%
173Java 6 -Xint 7 min7 min17,424800  0% 0% 100% 0%
268PHP 12 min12 min6,300736  0% 0% 100% 0%
1,592JavaScript TraceMonkey 1h 11 min1h 11 min61,700609  3% 17% 0% 81%
Clean Bad Output530
Fortran Intel Failed1768
Go 6g 8g Failed594
Lisaac Make Error928
OCaml Make Error560
Python 3 #3 Failed512
Ruby 1.9 #2 Failed653
Ruby JRuby #2 Failed653
Ruby MRI #2 Failed653
Smalltalk VisualWorks #3 Failed652
interesting alternative programs
 Python CPython #4 0.080.00?257
 Python 3 #4 Failed  263
0.4Lua LuaJIT #8 0.990.991,284609
0.4Lua #8 1.021.021,444609
7.5Lua LuaJIT #4 20.2520.251,368734
56Lua #4 152.07152.081,552734

 pidigits benchmark : Streaming arbitrary-precision arithmetic

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

Revised BSD license