Python Interpreters Benchmarks
x64 ArchLinux : AMD® Ryzen 7 4700U®

 pidigits benchmark N=10,000

Each chart bar shows how many times more Memory, one ↓ pidigits program used, compared to the program that used least Memory.

These are not the only programs that could be written. These are not the only compilers and interpreters. These are not the only programming languages.

Column × shows how many times more each program used compared to the benchmark program that used least.

    sortsort sort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 Python development version #4 0.010.02?379  33% 100% 0% 0% 0% 0% 0% 0%
 Cython #4 0.020.02?349  0% 0% 100% 0% 0% 33% 0% 0%
 Python 3 #4 0.030.03?379  25% 0% 100% 0% 0% 0% 33% 25%
 Nuitka #4 0.030.03?379  0% 75% 0% 0% 0% 0% 0% 0%
 Jython 10.776.453,588322  18% 30% 55% 20% 13% 7% 13% 12%
 MicroPython 11.1511.163,744322  1% 0% 1% 0% 0% 100% 0% 1%
 Python 2 2.132.137,128322  0% 0% 0% 0% 1% 0% 100% 0%
 Pyston 2.072.079,304322  1% 100% 0% 0% 0% 0% 0% 1%
 Cython 2.022.039,528322  100% 0% 0% 0% 2% 0% 0% 0%
 Python development version 2.012.029,924322  1% 0% 100% 0% 1% 0% 1% 0%
 Python 3 2.162.1710,980322  1% 100% 0% 0% 0% 0% 0% 1%
 Cython #2 0.590.5911,024364  2% 0% 0% 0% 2% 0% 98% 0%
 Cython #3 1.081.0811,172639  1% 0% 0% 0% 100% 0% 0% 0%
 Python development version #2 0.560.5611,336389  0% 0% 100% 0% 4% 2% 0% 2%
 Python development version #5 0.480.4911,392710  100% 0% 0% 0% 4% 2% 0% 0%
 Python development version #3 1.071.0711,632664  0% 0% 0% 99% 2% 2% 1% 0%
 Nuitka 2.112.1211,836322  1% 0% 0% 100% 2% 1% 0% 0%
 Python 3 #5 0.500.5112,604710  2% 100% 0% 0% 0% 0% 0% 2%
 Python 3 #3 1.111.1112,640664  95% 0% 1% 1% 6% 0% 0% 0%
 Python 3 #2 0.610.6212,792389  5% 0% 2% 0% 2% 2% 2% 100%
 Nuitka #5 0.490.5013,168710  6% 0% 2% 0% 94% 0% 4% 0%
 Nuitka #2 0.510.5113,312389  98% 0% 0% 0% 0% 0% 2% 0%
 Nuitka #3 1.031.0413,512664  3% 1% 1% 0% 1% 1% 0% 100%
 RustPython 1.371.3716,132322  0% 1% 0% 0% 0% 1% 100% 1%
 PyPy 3 2.842.8475,604322  76% 2% 0% 0% 1% 24% 1% 0%
 PyPy 2 2.982.9981,732322  100% 0% 0% 0% 1% 0% 0% 0%
 Graal 8.156.17803,816322  0% 93% 9% 0% 6% 16% 4% 7%
missing benchmark programs
IronPython No program
Shedskin No program
Numba No program
Grumpy No program

 pidigits benchmark : Streaming arbitrary-precision arithmetic

diff program output N = 27 with this output file to check your program is correct before contributing.

We are trying to show the performance of various programming language implementations - so we ask that contributed programs not only give the correct result, but also use the same algorithm to calculate that result.

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

  Home   Conclusions   License   Play