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.0PyPy 2 1.280.4979,1761009  18% 56% 59% 4% 40% 36% 0% 56%
1.1Pyston #3 3.470.5113,476894  84% 88% 87% 90% 86% 86% 87% 92%
1.2Nuitka #3 4.050.5614,572894  93% 89% 82% 89% 96% 91% 89% 91%
1.2Nuitka #4 4.150.5814,5521069  91% 91% 88% 86% 90% 88% 93% 90%
1.4PyPy 3 #4 2.490.6681,2241069  43% 41% 44% 40% 81% 40% 43% 49%
1.4PyPy 3 #3 2.390.6781,384894  37% 37% 39% 42% 39% 39% 89% 38%
1.5Pyston #4 4.780.7213,4641069  87% 87% 86% 81% 84% 91% 92% 85%
1.6PyPy 3 1.610.7680,7961271  39% 5% 39% 1% 49% 42% 1% 43%
1.6PyPy 3 #6 0.740.7666,624552  0% 1% 0% 0% 0% 0% 97% 0%
1.7PyPy 3 #2 1.880.8579,9361008  36% 0% 1% 43% 42% 56% 44% 1%
1.9Python development version #4 6.760.9215,1481069  93% 92% 93% 95% 96% 95% 93% 98%
1.9Python development version #3 6.350.9215,068894  91% 96% 90% 91% 90% 89% 83% 91%
1.9Pyston #2 3.530.9413,4601008  33% 15% 92% 96% 81% 6% 94% 12%
2.5Nuitka #2 4.721.2314,4081008  5% 98% 97% 2% 96% 94% 1% 1%
2.9Nuitka 5.271.3914,5601271  87% 18% 1% 97% 8% 1% 91% 95%
3.4Python development version #2 6.381.6515,0401008  95% 19% 97% 5% 4% 7% 94% 97%
4.1Python development version 7.681.9715,2641271  94% 28% 97% 18% 23% 96% 98% 13%
4.5Python 3 #4 14.552.2012,8121069  94% 95% 94% 90% 98% 90% 93% 90%
4.8Python 3 #3 13.672.3112,852894  87% 84% 97% 85% 90% 94% 89% 87%
5.8Nuitka #6 2.782.8010,700552  0% 100% 0% 0% 1% 0% 1% 0%
5.9Python 2 11.022.8511,4601009  6% 4% 97% 95% 94% 0% 1% 96%
6.0Pyston #6 2.932.938,508552  12% 8% 4% 100% 1% 2% 4% 1%
6.3Python 3 #2 11.973.0712,6721008  97% 26% 98% 14% 8% 96% 98% 6%
7.2Graal #6 3.863.47735,676552  93% 75% 86% 90% 76% 86% 98% 70%
7.5Python development version #6 3.643.649,548552  16% 8% 100% 4% 7% 6% 5% 7%
8.5Python 3 16.044.1212,8881271  98% 94% 29% 28% 30% 98% 99% 21%
12Python 3 #6 5.635.648,096552  49% 21% 20% 16% 69% 19% 12% 13%
13MicroPython #6 6.216.224,348552  0% 0% 0% 100% 0% 0% 0% 0%
464RustPython #6 224.80224.8114,552552  0% 0% 0% 0% 100% 0% 0% 0%
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