/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.0C++ g++ #3 58.6858.70372593  1% 0% 0% 100%
1.0C++ g++ #7 22.6922.703721150  0% 2% 100% 0%
1.1C gcc #3 49.5349.54404567  1% 0% 1% 100%
1.1C gcc #4 22.7722.784081183  0% 1% 100% 0%
1.1C gcc 58.5658.58408508  0% 1% 100% 0%
1.2C gcc #2 51.6213.254401557  98% 93% 100% 99%
1.4Fortran Intel 58.8258.84520590  0% 0% 0% 100%
2.1OCaml #2 90.3990.42764473  93% 0% 0% 7%
2.1OCaml 106.38106.41764524  96% 0% 0% 4%
2.1Rust 77.4877.50780601  0% 0% 1% 100%
2.2Pascal Free Pascal 75.3418.878321018  100% 100% 100% 100%
2.7Go 71.1817.87988900  99% 100% 100% 100%
5.0Perl 43 min43 min1,864457  0% 0% 0% 100%
5.4Ada 2005 GNAT #3 38.129.591,9962100  99% 100% 99% 99%
6.6Haskell GHC #4 71.1466.002,460658  3% 3% 3% 100%
8.8PHP #2 48 min48 min3,256441  100% 0% 0% 0%
8.9PHP 57 min57 min3,312482  3% 97% 0% 0%
11Haskell GHC 12 min8 min3,948553  55% 28% 32% 25%
11Haskell GHC #5 63.3916.154,036834  99% 100% 100% 94%
14Haskell GHC #2 8 min162.275,344808  83% 83% 83% 82%
15Python 3 #6 38 min38 min5,428385  1% 0% 0% 100%
20Ruby 40 min40 min7,508384  0% 0% 0% 100%
23Fortran Intel #3 51.2012.848,5641148  100% 100% 100% 100%
23Perl #2 35 min8 min8,720565  100% 99% 99% 99%
30OCaml #4 0.0016.3011,2801004  100% 100% 100% 100%
32Erlang 13 min203.7611,7961038  100% 98% 100% 100%
35Erlang HiPE 8 min125.7312,8721038  99% 100% 97% 97%
40PHP #3 56 min14 min14,9681150  99% 98% 99% 95%
41C# Mono 92.5592.5715,072520  0% 1% 100% 0%
42C# Mono #2 50.4050.4115,540564  0% 0% 0% 100%
43F# Mono #2 96.4496.4716,068548  1% 100% 0% 0%
43F# Mono #4 84.0384.0516,104612  0% 0% 0% 100%
44C# Mono #3 97.2524.6516,3001096  98% 98% 99% 100%
51Racket 297.55297.5218,840649  1% 41% 0% 59%
53Java  #2 69.6169.5719,664514  0% 99% 1% 1%
53Java  70.0617.7319,7201282  99% 99% 98% 99%
54Racket #2 272.16272.1420,220903  0% 1% 100% 0%
55F# Mono 172.86172.7120,396551  50% 1% 1% 50%
56Racket #3 286.8072.7320,6761096  100% 95% 100% 100%
57OCaml #3 0.0117.3621,3721017  100% 100% 100% 100%
58Lisp SBCL #3 71.5771.6021,400821  1% 1% 1% 100%
58Lisp SBCL #4 64.1616.5221,4401518  92% 97% 99% 100%
58F# Mono #3 84.4222.2921,700945  97% 93% 98% 91%
64Scala 88.7688.7023,636459  1% 1% 99% 0%
69Scala #2 69.8917.7725,6401017  97% 98% 100% 98%
86Lisp SBCL #5 59.5659.5831,952674  5% 1% 100% 5%
108Python 3 #2 59 min15 min40,096797  98% 97% 100% 97%
108Python 3 1h 05 min16 min40,1001108  99% 100% 99% 100%
149Hack 16 min16 min55,344532  1% 0% 0% 100%
159Clojure #3 82.0121.3359,1761491  99% 95% 96% 96%
169Clojure #2 166.4852.0762,9601088  80% 80% 79% 79%
320Lisp SBCL #2 161.18161.39119,104513  0% 1% 1% 100%
458Dart #2 84.0283.69170,484495  1% 1% 100% 0%
1,699Ruby JRuby 12 min12 min632,076384  33% 21% 24% 24%
C++ g++ #4 Make Error1439
C++ g++ Make Error1059
C++ g++ #5 Make Error1440
Dart Failed531
Haskell GHC #3 Timed Out5 min1153
Hack #2 Timed Out1h 20 min440
Hack #3 Failed1150
"wrong" (different) algorithm / less comparable programs
1.0C++ g++ #6 37.4037.41376894
57Java  #3 40.9810.4121,0321633
73Lisp SBCL 53.0113.3527,0881607

 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