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 69.3069.32260590  0% 1% 1% 100%
2.2C++ g++ #7 24.4524.465841150  1% 0% 1% 100%
2.3OCaml 153.72153.75600524  1% 1% 0% 100%
2.3OCaml #2 83.3483.36604473  0% 1% 1% 100%
2.4C++ g++ #3 57.2857.29624593  1% 0% 0% 100%
2.5C gcc 73.8773.90656508  1% 0% 0% 100%
2.5C gcc #4 24.3224.336601183  1% 0% 1% 100%
2.6C gcc #3 48.2648.28664567  1% 0% 0% 100%
2.7Pascal Free Pascal 67.5467.576921018  1% 1% 0% 100%
2.8C gcc #2 52.7852.807321557  1% 0% 0% 100%
2.9Go 103.28103.32764900  0% 1% 1% 100%
3.2Lua 43 min43 min820462  1% 0% 1% 100%
5.3C gcc #5 39.4439.451,384910  1% 0% 0% 100%
5.4C++ g++ #4 50.8250.841,4041439  0% 0% 1% 100%
5.4C++ g++ #5 51.0051.021,4121440  1% 1% 0% 100%
5.6Perl 41 min41 min1,468457  0% 1% 1% 100%
6.5Haskell GHC #4 82.2182.231,680658  1% 0% 0% 100%
7.4Haskell GHC #5 81.2081.231,936834  1% 0% 0% 100%
7.5Haskell GHC #3 56.5456.561,9401153  1% 0% 0% 100%
9.8PHP #2 42 min42 min2,548441  0% 0% 1% 100%
10PHP 52 min52 min2,584482  0% 0% 1% 100%
12Haskell GHC #2 253.66253.743,248808  1% 1% 0% 100%
13Haskell GHC 7 min7 min3,268553  1% 0% 0% 100%
15Ada 2005 GNAT #3 50.4450.473,9282100  1% 0% 1% 100%
16Python 3 #6 48 min48 min4,168385  0% 0% 1% 100%
19Ruby 45 min45 min5,036384  0% 0% 1% 100%
20C CINT 2h 57 min2h 57 min5,116536  0% 0% 0% 100%
29Fortran Intel #3 67.9167.937,4561148  1% 0% 1% 100%
31Rust #2 46.7046.728,1401191  1% 0% 0% 100%
36OCaml #4 0.00134.019,4281004  0% 0% 1% 100%
41JavaScript V8 #2 81.2881.3010,536472  1% 1% 0% 100%
41JavaScript V8 87.6887.7110,556463  1% 1% 1% 100%
41JavaScript V8 #3 71.3671.3910,572539  1% 0% 0% 100%
42PHP #3 41 min41 min11,0081150  1% 1% 0% 100%
44Erlang HiPE 6 min6 min11,4081038  1% 0% 0% 100%
66Lisp SBCL #3 68.6868.7017,068821  1% 1% 1% 100%
66Racket 5 min5 min17,132649  1% 1% 0% 100%
71Racket #2 5 min5 min18,376903  0% 1% 0% 100%
73OCaml #3 0.00107.8218,9481017  0% 1% 1% 100%
76Racket #3 5 min5 min19,7961096  1% 1% 1% 100%
84Lisp SBCL #5 62.3662.3821,860674  0% 0% 0% 100%
89Dart #2 76.3676.3823,052495  0% 0% 0% 100%
94Smalltalk VisualWorks 10 min10 min24,332838  3% 5% 2% 100%
95Java  #2 73.7873.8124,652514  1% 0% 0% 100%
98Lisp SBCL #4 61.5861.5925,4961518  0% 1% 1% 100%
102Java  67.6367.6626,6441282  1% 1% 0% 100%
108Python 3 #4 41 min41 min28,000944  1% 1% 0% 100%
111Scala 105.41105.4528,932459  2% 0% 1% 100%
115Scala #2 58.7858.8129,8161017  2% 1% 1% 100%
148C# Mono #2 47.6447.6638,384564  0% 1% 1% 100%
148C# Mono 85.8185.8338,384520  1% 0% 0% 100%
151C# Mono #3 114.84114.8739,3841096  1% 0% 0% 100%
152F# Mono #4 69.9870.0039,496612  0% 1% 1% 100%
158Lisp SBCL #2 159.16159.2441,088513  0% 1% 1% 100%
162F# Mono 180.65180.8342,056551  0% 1% 1% 100%
168F# Mono #2 102.87102.9043,788548  1% 0% 0% 100%
172F# Mono #3 121.02121.0644,728945  1% 0% 0% 100%
221Clojure #3 148.31148.3657,4321491  1% 0% 0% 100%
235Clojure #2 238.06238.1861,1801252  1% 0% 0% 100%
2,457Ruby JRuby #2 31 min31 min638,7521426  0% 1% 1% 100%
2,494Ruby JRuby 12 min12 min648,500384  0% 1% 1% 100%
C++ g++ Make Error1059
Perl #2 Failed565
Ruby #2 Timed Out1h 00 min1426
"wrong" (different) algorithm / less comparable programs
2.3C++ g++ #6 36.2536.27588894
98Java  #3 46.2746.2925,5881633
107Python 3 #3 2304.382.0027,948773
124Lisp SBCL 53.4353.4432,3641607
149C# Mono #4 93.0693.0938,648710
157C# Mono #5 128.55128.5940,7441400

 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