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.0C++ g++ #3 57.9157.93284593  1% 0% 0% 100%
1.0C++ g++ #7 27.2727.282841150  0% 100% 0% 1%
1.1C gcc #3 47.9847.99316567  0% 100% 1% 1%
1.1C gcc 57.8857.90316508  0% 100% 1% 1%
1.1C gcc #4 27.2627.273161183  0% 0% 1% 100%
1.2C gcc #5 38.269.75340910  100% 99% 99% 95%
1.2C gcc #2 54.7714.243441557  91% 98% 100% 96%
1.8Fortran Intel 68.4168.43520590  100% 0% 0% 0%
2.1OCaml 140.65140.69592524  0% 0% 0% 100%
2.1OCaml #2 71.1071.12596473  0% 0% 0% 100%
2.5Pascal Free Pascal 67.5416.936961018  100% 100% 100% 100%
2.7Go 104.4426.19772900  100% 100% 100% 100%
3.6C++ g++ #4 52.4813.371,0361439  100% 100% 99% 95%
3.6C++ g++ #5 50.0312.881,0361440  99% 99% 100% 99%
5.8Ada 2005 GNAT #3 39.299.871,6562100  100% 100% 100% 100%
6.2Perl 47 min47 min1,752457  100% 0% 0% 0%
6.8Haskell GHC #4 87.4684.031,932658  100% 2% 2% 2%
9.0PHP #2 45 min45 min2,544441  0% 0% 0% 100%
9.1PHP 57 min57 min2,576482  0% 98% 3% 0%
12Haskell GHC #3 64.4516.433,4521153  100% 100% 99% 94%
13Haskell GHC #5 76.5719.383,720834  100% 96% 100% 99%
13Haskell GHC 9 min7 min3,768553  71% 7% 7% 38%
15Python 3 #6 43 min43 min4,200385  0% 0% 1% 100%
18Haskell GHC #2 7 min144.594,996808  79% 78% 78% 78%
19Ruby 51 min51 min5,288384  0% 0% 0% 100%
22Perl #2 41 min10 min6,292565  100% 100% 99% 100%
24Rust #2 48.6012.416,9161180  100% 98% 100% 94%
29Erlang HiPE 6 min104.748,1801038  95% 99% 99% 94%
30Fortran Intel #3 66.8916.858,5081148  100% 100% 100% 100%
33OCaml #4 0.0033.579,2681004  100% 100% 100% 100%
37PHP #3 47 min12 min10,5641150  91% 93% 99% 100%
51Dart #2 79.4479.0814,528495  1% 1% 1% 100%
54Racket 5 min5 min15,364649  0% 1% 41% 60%
55Java  68.0417.2515,6961282  99% 99% 97% 99%
57Lisp SBCL #3 69.4069.4216,068821  1% 0% 0% 100%
57Java  #2 76.5076.4616,164514  0% 99% 1% 1%
59Racket #2 5 min5 min16,876903  0% 0% 30% 70%
60Racket #3 5 min83.7717,1601096  99% 100% 99% 100%
66C# Mono #2 64.4964.5118,616564  1% 0% 100% 0%
66C# Mono 88.8288.8418,624520  0% 100% 1% 0%
66OCaml #3 0.0026.4218,6961017  100% 100% 100% 100%
67Scala 100.61100.5518,988459  0% 1% 100% 0%
67F# Mono #4 72.0872.1119,124612  0% 1% 100% 1%
70C# Mono #3 114.9829.2819,7881096  99% 99% 98% 98%
70Scala #2 73.8918.7519,8201017  99% 99% 100% 97%
73Ruby #2 1h 25 min22 min20,8041426  100% 95% 98% 100%
74F# Mono #2 102.17102.2020,968548  0% 100% 0% 1%
81Lisp SBCL #5 61.7061.7222,940674  0% 0% 100% 1%
82F# Mono #3 125.0432.7623,212945  93% 98% 95% 97%
83F# Mono 168.29168.2423,536551  1% 51% 50% 1%
93Lisp SBCL #4 61.2415.7926,2961518  92% 99% 100% 98%
98Python 3 #2 1h 06 min16 min27,840797  99% 99% 98% 100%
98Python 3 1h 13 min18 min27,8881108  100% 99% 99% 98%
125Lisp SBCL #2 185.55185.6835,636513  13% 2% 100% 25%
133Rust 60.0215.0437,656644  100% 100% 100% 100%
171Clojure #3 148.9038.1048,5281491  97% 98% 98% 98%
188Clojure #2 254.1874.0553,4441088  85% 86% 86% 84%
2,184Ruby JRuby 14 min14 min620,384384  5% 41% 42% 22%
2,254Ruby JRuby #2 23 min6 min640,2681426  99% 97% 89% 93%
C++ g++ Failed1059
"wrong" (different) algorithm / less comparable programs
1.0C++ g++ #6 36.5036.52284894
60Java  #3 40.9110.4016,9921633
66C# Mono #4 86.1686.1718,884710
74C# Mono #5 113.5828.8921,0721400
118Lisp SBCL 53.3713.5033,6401607

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

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

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