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

 fannkuch-redux benchmark N=10

Each chart bar shows how many times slower, one ↓ fannkuch-redux program was, compared to the fastest program.

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.

    sort sortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Pyston #4 3.220.4595,3041069  91% 98% 91% 91% 85% 91% 91% 93%
1.0Pyston #3 3.190.4696,672894  78% 92% 87% 89% 85% 89% 87% 91%
1.3Python development version #3 4.090.5797,032894  93% 84% 91% 92% 96% 91% 91% 91%
1.3PyPy 2 1.680.58322,0081009  41% 19% 66% 16% 43% 68% 66% 32%
1.3Python development version #4 4.360.6097,1161069  92% 92% 90% 92% 97% 95% 92% 86%
1.4Nuitka #3 4.480.62102,152894  92% 90% 98% 89% 92% 84% 92% 90%
1.5Python 3 #3 4.720.6599,300894  91% 97% 91% 91% 85% 92% 91% 93%
1.5PyPy 3 #2 1.720.6780,0801008  14% 15% 55% 53% 47% 40% 46% 1%
1.5PyPy 3 #3 2.780.6880,052894  49% 93% 52% 52% 48% 52% 53% 46%
1.5PyPy 3 1.790.6980,2961271  16% 23% 56% 53% 93% 35% 3% 1%
1.6PyPy 3 #4 3.110.7380,0281069  54% 54% 56% 49% 93% 58% 53% 55%
1.7PyPy 3 #6 0.740.7569,036552  3% 3% 1% 3% 100% 0% 0% 0%
1.7Python 3 #4 5.700.78100,1641069  94% 91% 97% 94% 92% 87% 94% 92%
1.9Pyston #2 3.240.8552,9001008  96% 89% 19% 5% 2% 6% 91% 95%
2.3Nuitka #4 7.681.04102,8201069  86% 94% 95% 92% 96% 91% 93% 95%
2.7Python development version #2 4.601.2055,6921008  97% 95% 6% 3% 2% 92% 97% 1%
2.8Nuitka #2 4.741.2460,5441008  93% 95% 12% 2% 94% 96% 6% 2%
3.0Python development version 5.211.3556,4121271  13% 1% 96% 92% 90% 99% 1% 1%
3.1Python 3 #2 5.361.4055,0641008  14% 97% 1% 95% 92% 1% 96% 1%
3.5Python 3 6.021.5655,9641271  94% 97% 5% 3% 1% 6% 93% 97%
4.7Nuitka 8.082.0860,1961271  94% 4% 5% 98% 2% 95% 97% 1%
5.2Pyston #6 2.322.327,860552  1% 1% 2% 1% 0% 100% 0% 0%
6.4Python 2 11.022.8511,4601009  6% 4% 97% 95% 94% 0% 1% 96%
7.0Nuitka #6 3.113.1111,008552  2% 0% 100% 1% 0% 0% 2% 1%
7.2Python development version #6 3.233.238,564552  5% 100% 0% 2% 0% 0% 0% 0%
7.8Python 3 #6 3.463.4710,192552  1% 0% 1% 0% 100% 0% 0% 1%
7.8Graal #6 3.863.47735,676552  93% 75% 86% 90% 76% 86% 98% 70%
16MicroPython #6 7.017.014,180552  2% 1% 2% 2% 1% 0% 100% 1%
127RustPython #6 56.7556.7715,068552  2% 1% 1% 1% 1% 100% 1% 1%
missing benchmark programs
Jython No program
IronPython No program
Cython No program
Shedskin No program
Numba No program
Grumpy No program

 fannkuch-redux benchmark : Indexed-access to tiny integer-sequence

diff program output N = 7 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.

For N = 7 programs should generate these permutations (40KB) - which, incidentally, seem to be in the same order as permutations generated by the Tompkins-Paige algorithm, see pages 150-151 Permutation Generation Methods Robert Sedgewick.

The fannkuch benchmark is defined by programs in Performing Lisp Analysis of the FANNKUCH Benchmark, Kenneth R. Anderson and Duane Rettig.

Each program should

The conjecture is that this maximum count is approximated by n*log(n) when n goes to infinity.

FANNKUCH is an abbreviation for the German word Pfannkuchen, or pancakes, in analogy to flipping pancakes.


Thanks to Oleg Mazurov for insisting on a checksum and providing this helpful description of the approach he took -

Revised BSD license

  Home   Conclusions   License   Play