/mobile Handheld Friendly website

 fannkuch-redux benchmark N=12

Each chart bar shows how many times more Memory, one ↓ fannkuch-redux 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
1.0Fortran Intel 68.3068.32260590  0% 0% 0% 100%
1.1ATS 58.2658.272881306  0% 0% 0% 100%
1.1C gcc #3 44.7744.79288567  0% 0% 0% 100%
1.1ATS #2 57.8057.822881571  0% 0% 0% 100%
1.1C++ g++ #3 50.5750.59292593  0% 0% 0% 100%
1.1C gcc #4 24.6124.622921183  1% 0% 0% 100%
1.1C++ g++ #7 25.0425.052921150  1% 0% 0% 100%
1.1C gcc 56.9356.96292508  0% 0% 0% 100%
1.3C gcc #2 50.7750.793321557  0% 0% 0% 100%
2.2OCaml 146.98147.01576524  0% 0% 0% 100%
2.2OCaml #2 73.4673.47580473  0% 0% 0% 100%
2.9Pascal Free Pascal 65.3365.357441018  0% 0% 0% 100%
3.2Lua 35 min35 min820462  0% 0% 0% 100%
3.6C++ g++ 53.8253.849321059  0% 0% 0% 100%
3.8C++ g++ #5 49.6649.681,0001440  0% 0% 0% 100%
3.9C++ g++ #4 61.8661.891,0041439  0% 0% 0% 100%
3.9Go 84.7184.751,012900  0% 0% 0% 100%
5.6Perl 40 min40 min1,464457  0% 0% 0% 100%
6.1Haskell GHC #3 63.9263.941,5881153  0% 0% 0% 100%
6.4Ada 2005 GNAT #3 39.2939.321,6522100  0% 1% 0% 100%
7.1Haskell GHC #4 90.3390.361,836658  0% 0% 0% 100%
9.5PHP #2 45 min45 min2,476441  0% 0% 0% 100%
9.6PHP 59 min59 min2,508482  0% 0% 0% 100%
12Haskell GHC #2 289.09289.193,160808  0% 0% 0% 100%
12Haskell GHC 9 min9 min3,164553  0% 0% 0% 100%
15Lisp SBCL #2 101.92101.953,828513  0% 0% 0% 100%
18Python 3 #6 48 min53 min4,564385  0% 0% 0% 100%
19Ruby 2.0 1h 06 min1h 06 min4,864384  0% 0% 0% 100%
20C CINT 2h 57 min2h 57 min5,116536  0% 0% 0% 100%
21JavaScript V8 90.7390.765,472463  0% 0% 0% 100%
21JavaScript V8 #2 78.4278.465,484472  0% 0% 0% 100%
21JavaScript V8 #3 71.5771.605,508539  1% 0% 0% 100%
23Dart 23 min23 min5,980531  0% 0% 0% 100%
24Dart #2 78.7578.776,264538  0% 0% 0% 100%
29Fortran Intel #3 69.6969.717,5801148  0% 0% 0% 100%
29Erlang HiPE 6 min6 min7,6441038  0% 0% 0% 100%
35OCaml #4 0.00133.228,9961004  0% 0% 0% 100%
39PHP #3 47 min47 min10,1321150  0% 0% 0% 100%
52C# Mono 116.60116.6213,520520  0% 0% 0% 100%
52C# Mono #2 69.1869.1913,548564  0% 0% 0% 100%
53Lisp SBCL #3 61.4861.5013,744821  0% 0% 0% 100%
54Java 7  71.2671.2813,9361282  0% 0% 0% 100%
54Lisp SBCL #4 57.2957.3114,1081518  0% 0% 0% 100%
55C# Mono #3 134.00134.0314,3401096  0% 0% 0% 100%
55Java 7  #2 102.74102.7714,420514  0% 0% 0% 100%
58F# Mono #2 113.62113.6415,148548  0% 0% 0% 100%
58F# Mono 5 min5 min15,152551  0% 0% 0% 100%
59Racket 5 min5 min15,332649  0% 0% 0% 100%
65F# Mono #3 136.95136.9816,964945  1% 0% 0% 100%
71OCaml #3 0.00103.9618,5201017  0% 1% 0% 100%
72Scala 97.5997.6218,696459  0% 1% 0% 100%
79Scala #2 56.5656.5820,4721017  0% 1% 0% 100%
84Smalltalk VisualWorks 10 min10 min21,952838  0% 0% 0% 100%
254Clojure #2 280.95281.0866,0881088  0% 0% 0% 100%
2,243Ruby JRuby 15 min15 min583,116384  0% 0% 0% 100%
Python 3 #2 Timed Out1h 00 min797
Python 3 Timed Out1h 00 min1108
"wrong" (different) algorithm / less comparable programs
1.1C++ g++ #6 38.2238.24292894
3.8C++ g++ #2 29.1129.139882106
60Java 7  #3 41.3441.3515,6881633
71Lisp SBCL 46.6646.6818,5281607

 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