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 4.181.2479,1201009  80% 79% 98% 80%
1.1PyPy 2 4.201.3477,5201009  75% 91% 75% 75%
1.1PyPy 2 4.201.3479,3841009  75% 91% 72% 77%
1.2PyPy 3 #6 1.451.4563,960552  0% 8% 94% 1%
1.2PyPy 3 #6 1.451.4663,572552  0% 1% 6% 100%
1.2PyPy 3 #6 1.461.4663,808552  0% 1% 1% 100%
1.3PyPy 3 #2 4.551.6276,2681008  64% 64% 94% 62%
1.3PyPy 3 4.571.6277,5681271  62% 63% 64% 94%
1.3PyPy 3 #2 4.501.6276,3801008  63% 94% 60% 63%
1.3PyPy 3 4.611.6375,5441271  64% 63% 94% 63%
1.3PyPy 3 4.611.6475,0161271  88% 63% 65% 67%
1.3PyPy 3 #2 4.551.6476,0001008  94% 62% 62% 61%
1.7PyPy 3 #3 6.802.1576,084894  74% 72% 97% 75%
1.8PyPy 3 #3 6.712.2375,844894  70% 69% 73% 92%
1.8PyPy 3 #4 6.872.2475,0041069  71% 77% 91% 70%
1.8PyPy 3 #4 6.882.2477,3601069  71% 73% 71% 94%
1.8PyPy 3 #3 6.932.2475,636894  74% 73% 96% 75%
1.8PyPy 3 #4 6.902.2574,9361069  94% 71% 74% 74%
3.4Nuitka #3 15.654.1961,368894  96% 96% 98% 92%
3.4Nuitka #3 15.704.2061,408894  94% 92% 98% 94%
3.5Nuitka #4 16.224.2961,2561069  98% 94% 98% 96%
3.5Nuitka #3 15.744.2961,856894  95% 91% 97% 93%
3.5Nuitka #4 16.414.2962,0281069  97% 97% 96% 98%
3.5Nuitka #4 16.464.2961,4081069  95% 97% 96% 98%
4.1Python 3 #3 19.655.0855,660894  96% 96% 98% 97%
4.1Python 3 #3 19.695.0856,852894  98% 97% 96% 97%
4.1Python 3 #3 19.715.0954,960894  97% 98% 97% 97%
4.3Python 3 #4 20.335.2857,5481069  97% 96% 96% 96%
4.3Python 3 #4 20.225.2856,0241069  97% 96% 95% 95%
4.3Python 3 #4 20.295.2855,1281069  96% 98% 97% 95%
4.6Cython 21.875.6856,2241271  98% 98% 95% 98%
4.6Cython 21.845.6856,0801271  98% 96% 97% 97%
4.7Cython 21.665.7856,4081271  97% 96% 94% 95%
4.7Nuitka #2 22.295.8060,9721008  98% 98% 97% 98%
4.7Nuitka #2 22.025.8063,3601008  98% 97% 97% 96%
4.7Nuitka #2 22.065.9061,0641008  95% 95% 98% 94%
4.9Nuitka #6 6.106.1010,180552  96% 2% 0% 6%
5.0Nuitka #6 6.166.1610,272552  100% 1% 2% 4%
5.0Nuitka #6 6.246.2510,356552  13% 3% 90% 4%
5.1Python development version #4 24.616.3853,8521069  97% 98% 99% 98%
5.1Python development version #4 24.316.3852,4361069  97% 99% 95% 97%
5.2Python development version #4 24.646.4852,4281069  98% 97% 98% 97%
5.3Python development version #3 23.336.5854,500894  96% 99% 97% 97%
5.3Python development version #3 23.286.5953,188894  95% 97% 97% 98%
5.5Nuitka 26.186.7961,0201271  97% 99% 97% 98%
5.5Nuitka 26.246.7960,7001271  98% 98% 99% 97%
5.5Nuitka 26.096.7961,2041271  98% 96% 98% 97%
5.8Python development version #3 22.917.1952,908894  92% 98% 95% 98%
5.9Python 2 28.477.3546,1521009  97% 98% 99% 98%
5.9Python 2 28.307.3544,4681009  98% 97% 97% 97%
5.9Python 2 28.517.3644,1121009  98% 98% 97% 98%
6.2Python 3 #2 29.917.6855,2721008  98% 97% 97% 98%
6.2Python 3 #2 29.957.6957,3121008  97% 97% 97% 99%
6.2Python 3 #2 29.957.6957,9721008  97% 98% 98% 97%
6.8Python 3 #6 8.428.428,828552  0% 0% 0% 100%
6.8Python 3 #6 8.488.488,808552  0% 0% 0% 100%
6.9Python 3 #6 8.618.618,756552  0% 0% 100% 0%
7.1Python 3 34.778.8855,0241271  98% 99% 98% 98%
7.1Python 3 34.748.8955,8081271  97% 98% 99% 98%
7.2Python 3 34.788.8957,7441271  98% 98% 97% 99%
7.3Python development version #2 34.939.0852,4281008  98% 98% 96% 98%
7.3Python development version #2 34.969.0954,6921008  99% 97% 99% 97%
7.4Python development version #2 34.989.1952,6321008  98% 95% 98% 96%
7.6Python development version #6 9.479.487,436552  4% 100% 2% 1%
7.7Python development version #6 9.539.547,476552  12% 91% 3% 1%
7.7Python development version #6 9.559.557,372552  32% 3% 69% 1%
8.1MicroPython #6 10.0610.074,200552  100% 2% 2% 2%
8.1MicroPython #6 10.0810.094,224552  1% 100% 1% 1%
8.1MicroPython #6 10.0910.104,160552  18% 1% 83% 1%
8.7Python development version 40.8910.7954,5441271  98% 100% 95% 97%
8.7Python development version 41.0910.7952,6921271  96% 98% 98% 98%
8.9Python development version 40.7911.0952,6841271  95% 96% 97% 98%
missing benchmark programs
Jython No program
IronPython No program
Shedskin No program
Numba No program
Pyston 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