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.6222.636641150  1% 0% 0% 100%
1.0C gcc #4 22.6222.638081183  1% 2% 1% 100%
1.6C gcc #5 35.8435.851,520910  0% 0% 1% 100%
2.0Ada 2005 GNAT #3 44.8644.894,0842100  1% 1% 0% 100%
2.1C# Mono #2 48.6048.6237,488564  0% 1% 0% 100%
2.2Fortran Intel #3 48.8448.857,5201148  1% 1% 0% 100%
2.3C++ g++ #4 51.8751.891,8041439  1% 0% 0% 100%
2.3C++ g++ #5 52.8752.891,7761440  1% 0% 1% 100%
2.4Rust #2 53.2153.238,1601191  1% 1% 0% 100%
2.4C gcc #2 54.2854.309681557  0% 1% 1% 100%
2.4C gcc #3 54.3454.35820567  0% 1% 0% 100%
2.5Fortran Intel 57.4157.43256590  1% 0% 0% 100%
2.6Lisp SBCL #5 59.3459.3632,872674  1% 1% 0% 100%
2.6C++ g++ 59.5659.581,6521059  1% 0% 1% 100%
2.8F# Mono #4 64.4064.4240,708612  1% 0% 0% 100%
2.9OCaml #3 0.0164.7522,3081017  0% 0% 1% 100%
2.9Lisp SBCL #4 64.9164.9332,1481518  0% 1% 1% 100%
2.9Go 65.1765.191,788900  1% 1% 0% 100%
2.9OCaml #4 0.0165.8112,0441004  0% 0% 1% 100%
3.0C++ g++ #3 68.3668.38748593  0% 0% 0% 100%
3.1Java  69.2569.2747,7841282  1% 0% 0% 100%
3.1Haskell GHC #5 70.1870.212,340834  1% 1% 1% 100%
3.1Java  #2 70.5270.5439,896514  0% 1% 0% 100%
3.1Scala #2 70.8670.8848,5681017  0% 1% 1% 100%
3.1Haskell GHC #4 70.8870.902,096658  1% 1% 0% 100%
3.1C# Mono 71.1271.1439,304520  1% 1% 1% 100%
3.3JavaScript V8 #3 74.5474.5711,060539  1% 0% 0% 100%
3.4Lisp SBCL #3 75.9375.9523,696821  1% 0% 1% 100%
3.4Clojure #3 77.5077.5488,2081491  1% 1% 0% 100%
3.5JavaScript V8 #2 78.6978.7214,984472  1% 0% 0% 100%
3.7F# Mono #3 83.3783.4050,984945  1% 0% 0% 100%
3.7Dart #2 84.1084.1340,324495  0% 1% 0% 100%
3.8OCaml #2 85.9485.964,792473  1% 0% 0% 100%
3.8C# Mono #3 86.8986.9141,2801096  0% 0% 0% 100%
3.9Pascal Free Pascal 87.2887.317521018  1% 0% 0% 100%
3.9C gcc 88.3088.33732508  1% 1% 0% 100%
4.0JavaScript V8 90.2490.2711,076463  0% 1% 0% 100%
4.1Scala 91.6691.6848,484459  0% 0% 1% 100%
4.3F# Mono #2 97.0297.0446,284548  0% 1% 0% 100%
4.3OCaml 97.7497.76712524  1% 0% 0% 100%
6.6Clojure #2 148.87148.9777,5281252  1% 1% 1% 100%
6.8F# Mono 153.59153.8048,624551  0% 1% 1% 100%
8.5Lisp SBCL #2 190.98191.2581,520513  0% 1% 1% 100%
11Haskell GHC #2 248.45248.543,536808  1% 1% 0% 100%
12Racket #2 275.86275.9420,708903  1% 0% 0% 100%
13Racket #3 289.15289.2320,9281096  0% 1% 1% 100%
13Racket 5 min5 min19,460649  0% 0% 0% 100%
19Erlang HiPE 7 min7 min14,7281038  0% 0% 0% 100%
21Haskell GHC 7 min7 min3,492553  0% 0% 1% 100%
30Ruby JRuby 11 min11 min679,112384  1% 0% 0% 100%
31Smalltalk VisualWorks 11 min11 min56,156838  0% 1% 0% 100%
48Ruby JRuby #2 18 min18 min682,2241426  0% 1% 1% 100%
52Hack 19 min19 min113,820532  0% 1% 0% 100%
79Lua 29 min29 min1,008462  1% 1% 1% 100%
87Python 3 #4 32 min32 min39,988944  1% 1% 0% 100%
103Perl 38 min38 min1,836457  1% 0% 0% 100%
104Ruby 39 min39 min7,048384  1% 0% 0% 100%
115PHP #2 43 min43 min3,296441  1% 1% 0% 100%
116Python 3 #6 43 min43 min5,432385  1% 0% 0% 100%
120PHP #3 45 min45 min15,1881150  1% 1% 0% 100%
122Hack #2 45 min45 min113,716440  1% 1% 0% 100%
139Ruby #2 52 min52 min28,5841426  0% 1% 1% 100%
147PHP 55 min55 min3,344482  1% 1% 0% 100%
Haskell GHC #3 Timed Out1h 00 min1153
Hack #3 Failed1150
Perl #2 Failed565
"wrong" (different) algorithm / less comparable programs
1.7C++ g++ #6 37.7637.77720894
1.7C# Mono #4 39.3739.3839,180710
1.9C# Mono #5 42.4842.4944,5841400
2.0Java  #3 44.1744.1933,0881633
2.4Lisp SBCL 53.5153.5343,6281607
87Python 3 #3 1964.481.0041,972773

 fannkuch-redux benchmark : Indexed-access to tiny integer-sequence

You can write your own program for this task and contribute to the benchmarks game by following these general instructions.

More specifically:

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