fannkuch-redux benchmark N=12

Each chart bar shows how many times more Code, one ↓ fannkuch-redux program used, compared to the program that used least Code.

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.

    sortsortsort 
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0Ruby JRuby 14 min14 min616,088384  0% 1% 1% 100%
1.0Ruby 53 min53 min5,284384  0% 1% 1% 100%
1.0Python 3 #6 44 min44 min4,192385  0% 0% 0% 100%
1.1PHP #2 42 min42 min2,540441  0% 0% 0% 100%
1.2Perl 40 min40 min1,464457  0% 0% 0% 100%
1.2Scala 97.8297.8519,060459  0% 1% 0% 100%
1.2Lua 35 min35 min820462  0% 0% 0% 100%
1.2JavaScript V8 87.5487.568,396463  1% 1% 3% 100%
1.2JavaScript V8 #2 81.9081.926,392472  1% 0% 1% 100%
1.2OCaml #2 71.1071.12596473  0% 0% 0% 100%
1.3PHP 54 min54 min2,572482  0% 0% 0% 100%
1.3Dart #2 81.8681.8989,912495  0% 1% 0% 100%
1.3C gcc 57.8757.89316508  0% 0% 1% 100%
1.3Lisp SBCL #2 184.78184.8937,688513  1% 1% 0% 100%
1.3Java  #2 89.9389.9616,052514  0% 1% 0% 100%
1.4C# Mono 90.4990.5119,932520  0% 1% 1% 100%
1.4OCaml 132.35132.39592524  0% 0% 0% 100%
1.4C CINT 2h 57 min2h 57 min5,116536  0% 0% 0% 100%
1.4JavaScript V8 #3 71.5571.576,412539  1% 0% 0% 100%
1.4F# Mono #2 105.90105.9322,380548  0% 1% 1% 100%
1.4F# Mono 167.38167.5024,656551  0% 1% 0% 100%
1.4Haskell GHC 7 min7 min3,308553  0% 1% 1% 100%
1.5C# Mono #2 65.0065.0219,476564  0% 1% 1% 100%
1.5C gcc #3 47.9847.99312567  0% 0% 1% 100%
1.5Fortran Intel 68.3068.32260590  0% 0% 0% 100%
1.5C++ g++ #3 57.8657.87284593  1% 0% 0% 100%
1.6F# Mono #4 72.6072.6219,656612  0% 1% 1% 100%
1.7Rust 70.6370.6531,556644  0% 0% 1% 100%
1.7Racket 5 min5 min15,368649  0% 0% 1% 100%
1.7Haskell GHC #4 82.4082.431,720658  0% 1% 0% 100%
1.8Lisp SBCL #5 61.7061.7222,940674  1% 1% 0% 100%
2.1Haskell GHC #2 253.26253.363,284808  0% 1% 1% 100%
2.1Lisp SBCL #3 69.6669.6716,068821  1% 1% 0% 100%
2.2Haskell GHC #5 75.4275.441,976834  0% 0% 1% 100%
2.2Smalltalk VisualWorks 10 min10 min21,952838  0% 0% 0% 100%
2.3Go 104.56104.60772900  2% 1% 0% 100%
2.4Racket #2 5 min5 min16,856903  0% 1% 1% 100%
2.5F# Mono #3 127.18127.2125,312945  0% 1% 1% 100%
2.6OCaml #4 0.00133.889,1361004  0% 0% 0% 100%
2.6Scala #2 61.0861.1119,8601017  1% 1% 0% 100%
2.6OCaml #3 0.00105.2618,6801017  0% 1% 0% 100%
2.7Pascal Free Pascal 67.5467.576921018  1% 1% 0% 100%
2.7Erlang HiPE 6 min6 min7,6441038  0% 0% 0% 100%
2.8Clojure #2 260.61260.7352,4601088  0% 1% 1% 100%
2.9Racket #3 5 min5 min17,1841096  0% 0% 1% 100%
2.9C# Mono #3 113.44113.4720,8481096  0% 1% 0% 100%
3.0Fortran Intel #3 69.6969.717,5801148  0% 0% 0% 100%
3.0PHP #3 46 min46 min10,4121150  0% 0% 0% 100%
3.0C++ g++ #7 27.2227.232841150  0% 1% 1% 100%
3.0Haskell GHC #3 62.2462.261,9881153  0% 0% 1% 100%
3.1C gcc #4 27.2627.273161183  0% 0% 1% 100%
3.3Java  67.4067.4315,7201282  1% 1% 0% 100%
3.7Ruby JRuby #2 24 min24 min631,0721426  1% 1% 0% 100%
3.7C++ g++ #4 52.3852.393,0841439  0% 1% 1% 100%
3.8C++ g++ #5 49.9549.971,0361440  0% 0% 1% 100%
3.9Clojure #3 145.73145.7847,1361491  1% 1% 1% 100%
4.0Lisp SBCL #4 61.5161.5326,2961518  0% 1% 1% 100%
4.1C gcc #2 54.7854.793481557  1% 1% 0% 100%
5.5Ada 2005 GNAT #3 39.2939.311,6242100  0% 1% 1% 100%
C++ g++ Failed1059
Perl #2 Failed565
Python 3 #2 Timed Out1h 00 min797
Python 3 Timed Out1h 00 min1108
Ruby #2 Timed Out1h 00 min1426
"wrong" (different) algorithm / less comparable programs
1.8C# Mono #4 87.2187.2319,988710
2.3C++ g++ #6 36.5036.51284894
3.6C# Mono #5 115.55115.5822,6081400
4.2Lisp SBCL 53.4253.4333,6401607
4.3Java  #3 45.3745.3917,0841633

 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