/mobile Handheld Friendly website

 fannkuch-redux benchmark N=12

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.0Ada 2005 GNAT #3 39.379.911,6722100  100% 99% 99% 99%
1.3C++ g++ #5 49.7112.699961440  98% 100% 94% 100%
1.3C gcc #2 51.3813.073321557  96% 100% 100% 98%
1.4C++ g++ 53.8413.739361059  100% 98% 100% 95%
1.5Lisp SBCL #4 57.3014.7714,1121518  98% 99% 97% 94%
1.6C++ g++ #4 61.8915.931,0041439  95% 100% 98% 96%
1.7Pascal Free Pascal 65.3116.367481018  100% 100% 100% 100%
1.7Fortran Intel #3 66.8916.858,5081148  100% 100% 100% 100%
1.7Haskell GHC #3 66.8017.023,2641153  100% 99% 100% 94%
1.7Java 7  67.9117.1714,4601282  98% 99% 100% 100%
1.8Scala #2 70.9218.1020,4521017  98% 98% 98% 99%
2.2Go 84.7421.341,012900  99% 99% 100% 100%
2.5C gcc #4 24.7224.742921183  90% 0% 0% 10%
2.5C++ g++ #7 25.0925.112921150  59% 0% 0% 41%
2.6OCaml #3 0.0126.0718,5441017  100% 100% 100% 100%
3.4OCaml #4 0.0033.418,9961004  100% 100% 100% 100%
3.5C# Mono #3 134.2534.5416,2521096  97% 99% 96% 98%
4.2F# Mono #3 157.4641.6920,488945  96% 96% 94% 93%
4.5C gcc #3 44.7644.78292567  96% 0% 0% 4%
5.0C++ g++ #3 49.7749.79292593  0% 0% 25% 75%
5.7C gcc 56.9356.96292508  97% 0% 0% 4%
5.8ATS #2 57.8057.822881571  0% 1% 100% 0%
5.9ATS 58.2858.292881306  0% 0% 0% 100%
6.2Lisp SBCL #3 61.5261.5513,748821  100% 0% 0% 0%
6.9Fortran Intel 68.4168.43520590  100% 0% 0% 0%
6.9C# Mono #2 68.5268.5515,172564  61% 0% 40% 1%
7.4OCaml #2 73.4773.49580473  1% 0% 1% 100%
8.0Dart #2 78.7578.776,264538  29% 0% 0% 71%
8.3Clojure #2 277.7981.9870,0841088  85% 85% 85% 85%
8.8Java 7  #2 87.0186.9814,712514  1% 0% 100% 0%
9.3Haskell GHC #4 96.4992.152,000658  15% 38% 34% 18%
10Scala 99.2199.1718,756459  0% 0% 100% 0%
10Lisp SBCL #2 101.90101.943,832513  98% 0% 0% 2%
11Erlang HiPE 6 min104.748,1801038  95% 99% 99% 94%
11F# Mono #2 113.03113.0617,460548  95% 6% 0% 0%
12C# Mono 120.21120.2415,144520  0% 0% 0% 100%
15OCaml 145.87145.91576524  1% 0% 100% 0%
16Haskell GHC #2 7 min156.944,872808  76% 76% 76% 77%
20F# Mono 197.14197.1122,448551  1% 0% 36% 64%
32Racket 5 min5 min15,328649  0% 0% 0% 100%
69Haskell GHC 16 min11 min3,588553  34% 42% 38% 30%
71PHP #3 46 min11 min10,1921150  99% 100% 99% 100%
91Ruby JRuby 14 min14 min583,560384  0% 33% 48% 20%
106Python 3 #2 1h 08 min17 min25,128797  99% 99% 98% 100%
122Python 3 1h 19 min20 min25,2761108  100% 100% 99% 99%
143Dart 23 min23 min5,980531  0% 0% 100% 0%
259PHP #2 42 min42 min2,488441  0% 0% 100% 0%
285Perl 47 min47 min1,752457  100% 0% 0% 0%
294Python 3 #6 48 min48 min4,564385  83% 6% 2% 10%
360PHP 59 min59 min2,516482  0% 94% 0% 7%
416Ruby 2.0 1h 08 min1h 08 min4,864384  29% 69% 4% 1%
"wrong" (different) algorithm / less comparable programs
0.7C++ g++ #2 28.967.309722106
1.1Java 7  #3 42.1410.6915,7961633
1.2Lisp SBCL 46.6611.7618,5321607
3.9C++ g++ #6 38.2638.28292894

 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