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.4157.43256590  1% 0% 0% 100%
2.6C++ g++ #7 22.6222.636641150  1% 0% 0% 100%
2.8OCaml 97.7497.76712524  1% 0% 0% 100%
2.9C gcc 88.3088.33732508  1% 1% 0% 100%
2.9C++ g++ #3 68.3668.38748593  0% 0% 0% 100%
2.9Pascal Free Pascal 87.2887.317521018  1% 0% 0% 100%
3.2C gcc #4 22.6222.638081183  1% 2% 1% 100%
3.2C gcc #3 54.3454.35820567  0% 1% 0% 100%
3.8C gcc #2 54.2854.309681557  0% 1% 1% 100%
3.9Lua 29 min29 min1,008462  1% 1% 1% 100%
4.0Go 65.2765.291,024900  0% 0% 1% 100%
5.9C gcc #5 35.8435.851,520910  0% 0% 1% 100%
6.5C++ g++ 59.5659.581,6521059  1% 0% 1% 100%
6.9C++ g++ #5 52.8752.891,7761440  1% 0% 1% 100%
7.0C++ g++ #4 51.8751.891,8041439  1% 0% 0% 100%
7.2Perl 38 min38 min1,836457  1% 0% 0% 100%
8.2Haskell GHC #4 70.8870.902,096658  1% 1% 0% 100%
9.1Haskell GHC #5 70.1870.212,340834  1% 1% 1% 100%
13PHP #2 43 min43 min3,296441  1% 1% 0% 100%
13PHP 55 min55 min3,344482  1% 1% 0% 100%
14Haskell GHC 7 min7 min3,492553  0% 0% 1% 100%
14Haskell GHC #2 248.45248.543,536808  1% 1% 0% 100%
16Ada 2005 GNAT #3 44.8644.894,0842100  1% 1% 0% 100%
19OCaml #2 85.9485.964,792473  1% 0% 0% 100%
21Python 3 #6 43 min43 min5,432385  1% 0% 0% 100%
27JavaScript V8 91.1491.166,844463  1% 0% 0% 100%
27JavaScript V8 #2 79.1279.146,888472  0% 0% 0% 100%
27JavaScript V8 #3 73.0473.066,920539  1% 1% 0% 100%
28Ruby 39 min39 min7,048384  1% 0% 0% 100%
29Fortran Intel #3 48.8448.857,5201148  1% 1% 0% 100%
32Rust #2 60.5860.608,1201191  1% 0% 0% 100%
47OCaml #4 0.0165.8112,0441004  0% 0% 1% 100%
52Erlang HiPE 7 min7 min13,3281038  1% 0% 0% 100%
59PHP #3 45 min45 min15,1881150  1% 1% 0% 100%
76Racket 5 min5 min19,460649  0% 0% 0% 100%
81Racket #2 275.86275.9420,708903  1% 0% 0% 100%
82Racket #3 289.15289.2320,9281096  0% 1% 1% 100%
87OCaml #3 0.0164.7522,3081017  0% 0% 1% 100%
93Lisp SBCL #3 75.9375.9523,696821  1% 0% 1% 100%
112Ruby #2 52 min52 min28,5841426  0% 1% 1% 100%
126Lisp SBCL #4 64.9164.9332,1481518  0% 1% 1% 100%
128Lisp SBCL #5 59.3459.3632,872674  1% 1% 0% 100%
133Dart #2 84.2184.2534,004495  1% 0% 0% 100%
152C# Mono 70.3570.3739,032520  1% 1% 1% 100%
153C# Mono #2 46.6046.6139,284564  1% 1% 0% 100%
156Java  #2 70.5270.5439,896514  0% 1% 0% 100%
156Python 3 #4 32 min32 min39,988944  1% 1% 0% 100%
157C# Mono #3 86.2386.2640,3161096  1% 1% 1% 100%
158F# Mono #4 63.6163.6340,336612  1% 1% 1% 100%
187Java  69.2569.2747,7841282  1% 0% 0% 100%
189Scala 91.6691.6848,484459  0% 0% 1% 100%
190Scala #2 70.8670.8848,5681017  0% 1% 1% 100%
211Smalltalk VisualWorks 11 min11 min53,984838  0% 1% 1% 100%
270Clojure #2 156.38156.4969,2401088  1% 1% 0% 100%
289Hack 16 min16 min74,064532  0% 0% 0% 100%
289Hack #2 35 min35 min74,064440  1% 0% 0% 100%
307Clojure #3 70.2670.2978,5961491  1% 1% 0% 100%
318Lisp SBCL #2 190.98191.2581,520513  0% 1% 1% 100%
2,653Ruby JRuby 11 min11 min679,112384  1% 0% 0% 100%
2,665Ruby JRuby #2 18 min18 min682,2241426  0% 1% 1% 100%
F# Mono #3 Failed945
F# Mono Failed551
F# Mono #2 Failed548
Haskell GHC #3 Timed Out1h 00 min1153
Hack #3 Failed1150
Perl #2 Failed565
"wrong" (different) algorithm / less comparable programs
2.8C++ g++ #6 37.7637.77720894
129Java  #3 44.1744.1933,0881633
153C# Mono #4 38.4938.5039,272710
164C# Mono #5 42.5642.5841,9121400
164Python 3 #3 1964.481.0041,972773
170Lisp SBCL 53.5153.5343,6281607

 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