/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 gcc #4 24.6124.622921183  1% 0% 0% 100%
1.0C++ g++ #7 25.0425.052921150  1% 0% 0% 100%
1.6Ada 2005 GNAT #3 39.2939.321,6522100  0% 1% 0% 100%
1.8C gcc #3 44.7744.79288567  0% 0% 0% 100%
2.0C++ g++ #5 49.6649.681,0001440  0% 0% 0% 100%
2.1C++ g++ #3 50.5750.59292593  0% 0% 0% 100%
2.1C gcc #2 50.7750.793321557  0% 0% 0% 100%
2.2C++ g++ 53.8253.849321059  0% 0% 0% 100%
2.3Scala #2 56.5656.5820,4721017  0% 1% 0% 100%
2.3C gcc 56.9356.96292508  0% 0% 0% 100%
2.3Lisp SBCL #4 57.2957.3114,1081518  0% 0% 0% 100%
2.3ATS #2 57.8057.822881571  0% 0% 0% 100%
2.4ATS 58.2658.272881306  0% 0% 0% 100%
2.5Lisp SBCL #3 61.4861.5013,744821  0% 0% 0% 100%
2.5C++ g++ #4 61.8661.891,0041439  0% 0% 0% 100%
2.6Haskell GHC #3 63.9263.941,5881153  0% 0% 0% 100%
2.7Pascal Free Pascal 65.3365.357441018  0% 0% 0% 100%
2.8Fortran Intel 68.3068.32260590  0% 0% 0% 100%
2.8C# Mono #2 69.1869.1913,548564  0% 0% 0% 100%
2.8Fortran Intel #3 69.6969.717,5801148  0% 0% 0% 100%
2.9Java 7  71.2671.2813,9361282  0% 0% 0% 100%
2.9JavaScript V8 #3 71.5771.605,508539  1% 0% 0% 100%
3.0OCaml #2 73.4673.47580473  0% 0% 0% 100%
3.2JavaScript V8 #2 78.4278.465,484472  0% 0% 0% 100%
3.2Dart #2 78.7578.776,264538  0% 0% 0% 100%
3.4Go 84.7184.751,012900  0% 0% 0% 100%
3.7Haskell GHC #4 90.3390.361,836658  0% 0% 0% 100%
3.7JavaScript V8 90.7390.765,472463  0% 0% 0% 100%
4.0Scala 97.5997.6218,696459  0% 1% 0% 100%
4.1Lisp SBCL #2 101.92101.953,828513  0% 0% 0% 100%
4.2Java 7  #2 102.74102.7714,420514  0% 0% 0% 100%
4.2OCaml #3 0.00103.9618,5201017  0% 1% 0% 100%
4.6F# Mono #2 113.62113.6415,148548  0% 0% 0% 100%
4.7C# Mono 116.60116.6213,520520  0% 0% 0% 100%
5.4OCaml #4 0.00133.228,9961004  0% 0% 0% 100%
5.4C# Mono #3 134.00134.0314,3401096  0% 0% 0% 100%
5.6F# Mono #3 136.95136.9816,964945  1% 0% 0% 100%
6.0OCaml 146.98147.01576524  0% 0% 0% 100%
11Clojure #2 280.95281.0866,0881088  0% 0% 0% 100%
12Haskell GHC #2 289.09289.193,160808  0% 0% 0% 100%
13Racket 5 min5 min15,332649  0% 0% 0% 100%
13F# Mono 5 min5 min15,152551  0% 0% 0% 100%
15Erlang HiPE 6 min6 min7,6441038  0% 0% 0% 100%
22Haskell GHC 9 min9 min3,164553  0% 0% 0% 100%
24Smalltalk VisualWorks 10 min10 min21,952838  0% 0% 0% 100%
38Ruby JRuby 15 min15 min583,116384  0% 0% 0% 100%
57Dart 23 min23 min5,980531  0% 0% 0% 100%
87Lua 35 min35 min820462  0% 0% 0% 100%
99Perl 40 min40 min1,464457  0% 0% 0% 100%
110PHP #2 45 min45 min2,476441  0% 0% 0% 100%
117PHP #3 47 min47 min10,1321150  0% 0% 0% 100%
130Python 3 #6 48 min53 min4,564385  0% 0% 0% 100%
145PHP 59 min59 min2,508482  0% 0% 0% 100%
163Ruby 2.0 1h 06 min1h 06 min4,864384  0% 0% 0% 100%
434C CINT 2h 57 min2h 57 min5,116536  0% 0% 0% 100%
Python 3 #2 Timed Out1h 00 min797
Python 3 Timed Out1h 00 min1108
"wrong" (different) algorithm / less comparable programs
1.2C++ g++ #2 29.1129.139882106
1.6C++ g++ #6 38.2238.24292894
1.7Java 7  #3 41.3441.3515,6881633
1.9Lisp SBCL 46.6646.6818,5281607

 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