/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 57.6257.64244590  0% 0% 0% 100%
1.5C++ g++ #7 22.6522.663721150  0% 1% 1% 100%
1.5C++ g++ #3 58.6758.68376593  0% 0% 0% 100%
1.7C gcc 58.6058.61404508  1% 1% 1% 100%
1.7C gcc #3 49.5149.52404567  0% 0% 1% 100%
1.7C gcc #4 22.7022.704041183  0% 1% 1% 100%
1.8C gcc #2 51.6551.674401557  0% 0% 0% 100%
3.1OCaml #2 90.3890.41760473  0% 0% 0% 100%
3.1OCaml 106.37106.41764524  0% 0% 0% 100%
3.2Rust 77.4877.50780601  0% 0% 1% 100%
3.4Pascal Free Pascal 75.3575.378241018  0% 0% 0% 100%
4.0Go 71.1871.20984900  0% 0% 1% 100%
4.2Lua 35 min35 min1,016462  0% 0% 0% 100%
7.5Perl 38 min38 min1,836457  0% 0% 0% 100%
8.0Ada 2005 GNAT #3 38.1038.121,9562100  1% 0% 0% 100%
8.6Haskell GHC #4 67.8867.912,108658  0% 1% 1% 100%
9.7Haskell GHC #5 65.5465.562,364834  0% 1% 1% 100%
13PHP #2 49 min49 min3,264441  0% 0% 0% 100%
14PHP 55 min55 min3,316482  0% 0% 0% 100%
14Haskell GHC 7 min7 min3,504553  0% 1% 1% 100%
15Haskell GHC #2 249.18249.283,564808  0% 1% 1% 100%
22Python 3 #6 38 min38 min5,416385  1% 0% 0% 100%
30JavaScript V8 94.6294.657,416463  0% 0% 0% 100%
31JavaScript V8 #2 81.9481.977,448472  0% 1% 1% 100%
31JavaScript V8 #3 78.8878.907,452539  0% 1% 1% 100%
31Ruby 39 min39 min7,512384  0% 0% 0% 100%
31Fortran Intel #3 48.9748.997,5961148  0% 0% 0% 100%
47OCaml #4 0.0065.0211,4161004  0% 0% 0% 100%
48Erlang HiPE 7 min7 min11,6241038  0% 0% 0% 100%
62C# Mono 92.5592.5715,076520  0% 0% 0% 100%
64C# Mono #2 50.4050.4115,540564  0% 0% 0% 100%
64PHP #3 50 min50 min15,5601150  0% 0% 0% 100%
66F# Mono #2 96.4896.5016,068548  0% 0% 1% 100%
66F# Mono #4 84.0384.0516,108612  0% 0% 0% 100%
67C# Mono #3 102.75102.7816,2761096  0% 0% 1% 100%
77Racket 297.40297.4818,820649  0% 0% 1% 100%
82Java  68.8968.9119,8921282  1% 1% 1% 100%
82Java  #2 73.1073.1319,920514  0% 0% 0% 100%
83Racket #2 272.01272.0820,224903  0% 0% 1% 100%
84F# Mono 173.84174.0120,396551  0% 1% 1% 100%
85Racket #3 296.07296.1420,8041096  0% 1% 1% 100%
87F# Mono #3 83.6283.6421,192945  0% 1% 1% 100%
88OCaml #3 0.0069.3021,4001017  0% 0% 0% 100%
88Lisp SBCL #3 71.4771.4921,416821  0% 1% 1% 100%
88Lisp SBCL #4 64.2264.2321,4761518  0% 0% 0% 100%
98Scala 90.0790.1023,940459  0% 0% 0% 100%
107Scala #2 58.0858.1026,2161017  1% 1% 1% 100%
131Lisp SBCL #5 59.5459.5631,960674  2% 0% 2% 100%
164Python 3 #2 59 min59 min40,080797  0% 0% 1% 100%
175Smalltalk VisualWorks 11 min11 min42,580838  0% 0% 0% 100%
227Hack 15 min15 min55,344532  1% 0% 0% 100%
248Clojure #3 71.1571.1860,4001491  0% 0% 1% 100%
261Clojure #2 155.79155.9063,6401088  1% 1% 1% 100%
488Lisp SBCL #2 161.11161.32119,120513  0% 1% 1% 100%
704Dart #2 84.1384.16171,780495  0% 0% 1% 100%
2,662Ruby JRuby 12 min12 min649,516384  0% 0% 0% 100%
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
Perl #2 Failed565
Python 3 Timed Out1h 00 min1108
"wrong" (different) algorithm / less comparable programs
1.5C++ g++ #6 37.4037.41376894
86Java  #3 43.9944.0121,0441633
111Lisp SBCL 53.0153.0327,1001607

 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