/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.0C++ g++ #7 22.5322.543721150  0% 0% 0% 100%
1.0C gcc #4 22.6922.703721183  0% 0% 0% 100%
1.7Ada 2005 GNAT #3 38.1738.201,9602100  0% 0% 0% 100%
2.0C# Mono #2 44.8244.8313,844564  0% 0% 0% 100%
2.1C++ g++ #5 47.9347.951,2401440  0% 0% 0% 100%
2.1C gcc #2 48.4148.434121557  0% 0% 0% 100%
2.2Fortran Intel #3 48.9748.997,5961148  0% 0% 0% 100%
2.2C gcc #3 50.3550.37372567  0% 0% 0% 100%
2.3ATS #2 51.4651.483601571  0% 0% 0% 100%
2.3ATS 51.7251.733641306  0% 0% 0% 100%
2.3Lisp SBCL #4 52.6252.6421,2041518  0% 0% 0% 100%
2.4C++ g++ #3 53.3853.39372593  0% 0% 0% 100%
2.4C++ g++ 54.8254.841,1401059  0% 0% 0% 100%
2.6Fortran Intel 57.6257.64244590  0% 0% 0% 100%
2.7C++ g++ #4 60.1060.121,2401439  0% 0% 0% 100%
2.7Lisp SBCL #3 60.9360.9520,632821  0% 0% 0% 100%
2.7Scala #2 61.3661.3825,2681017  0% 0% 0% 100%
2.8F# Mono #3 62.1462.1620,428945  0% 0% 0% 100%
2.9OCaml #4 0.0065.3211,2961004  0% 0% 0% 100%
2.9OCaml #3 0.0065.4821,0081017  0% 0% 0% 100%
2.9Haskell GHC #4 66.3466.361,972658  0% 0% 0% 100%
3.1Java 7  70.1870.2017,1681282  0% 0% 0% 100%
3.2C gcc 71.5971.61376508  0% 0% 0% 100%
3.2C# Mono #3 72.4172.4315,0601096  0% 0% 0% 100%
3.3Go 73.6173.641,276900  0% 0% 0% 100%
3.3Pascal Free Pascal 75.3575.378241018  0% 0% 0% 100%
3.4Java 7  #2 76.6276.6417,560514  0% 0% 0% 100%
3.5JavaScript V8 #3 78.6778.706,312539  0% 0% 0% 100%
3.5C# Mono 79.4179.4313,844520  0% 0% 0% 100%
3.6F# Mono #2 80.0780.0917,004548  0% 0% 0% 100%
3.7Dart #2 82.4482.468,988538  0% 0% 0% 100%
3.8JavaScript V8 #2 84.8284.846,272472  0% 0% 0% 100%
3.8Lisp SBCL #2 86.7086.724,780513  0% 0% 0% 100%
4.1OCaml #2 91.9992.01748473  0% 0% 0% 100%
4.2JavaScript V8 94.7494.786,292463  0% 0% 0% 100%
4.2Scala 94.9694.9922,952459  0% 0% 0% 100%
4.7OCaml 106.85106.87752524  0% 0% 0% 100%
5.9Clojure #2 132.60132.6953,6241088  0% 0% 0% 100%
13Haskell GHC #2 288.46288.563,376808  0% 0% 0% 100%
14Racket 5 min5 min18,008649  0% 0% 0% 100%
14F# Mono 5 min5 min15,004551  0% 0% 0% 100%
20Erlang HiPE 7 min7 min11,6241038  0% 0% 0% 100%
26Haskell GHC 9 min9 min3,360553  0% 0% 0% 100%
31Smalltalk VisualWorks 11 min11 min42,580838  0% 0% 0% 100%
36Ruby JRuby 13 min13 min599,808384  0% 0% 0% 100%
71Dart 26 min26 min8,660531  0% 0% 0% 100%
94Lua 35 min35 min1,016462  0% 0% 0% 100%
102Perl 38 min38 min1,836457  0% 0% 0% 100%
104Python 3 #6 39 min39 min6,152385  0% 0% 0% 100%
134PHP #3 50 min50 min14,7161150  0% 0% 0% 100%
138PHP #2 51 min51 min3,188441  0% 0% 0% 100%
148Ruby 2.0 55 min55 min6,148384  0% 0% 0% 100%
156PHP 58 min58 min3,232482  0% 0% 0% 100%
Haskell GHC #3 Timed Out1h 00 min1153
Python 3 Timed Out1h 00 min1108
Python 3 #2 Timed Out1h 00 min797
"wrong" (different) algorithm / less comparable programs
1.4C++ g++ #2 31.5231.541,1962106
1.8C++ g++ #6 40.5240.54376894
2.0Lisp SBCL 44.1444.1526,8481607
2.1Java 7  #3 47.9647.9819,4681633

 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