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.0C++ g++ #3 59.1559.17360593  1% 100% 0% 0%
1.0C++ g++ #7 22.6922.703601150  1% 0% 1% 100%
1.1C gcc #3 52.4452.47392567  1% 99% 1% 2%
1.1C gcc #4 22.6622.673921183  0% 1% 100% 0%
1.1C gcc 63.1763.19392508  1% 1% 100% 0%
1.2C gcc #2 55.4814.254281557  98% 96% 96% 100%
1.4Fortran Intel 57.5957.61516590  1% 0% 1% 100%
2.0OCaml 97.7297.74708524  1% 0% 100% 0%
2.1Pascal Free Pascal 87.2821.877521018  100% 100% 100% 100%
2.8Go 65.2916.461,024900  100% 99% 99% 99%
3.5C++ g++ #4 53.5613.731,2641439  99% 100% 98% 94%
3.5C++ g++ #5 53.3313.631,2641440  100% 98% 99% 94%
5.2Perl 42 min42 min1,872457  5% 18% 0% 78%
5.5Ada 2005 GNAT #3 38.259.611,9762100  100% 99% 100% 100%
7.6OCaml #2 85.9485.962,740473  1% 0% 0% 100%
9.2PHP #2 43 min43 min3,304441  1% 38% 0% 62%
9.3PHP 53 min53 min3,344482  1% 0% 0% 100%
13C gcc #5 34.618.854,520910  99% 98% 100% 94%
15Python 3 #6 38 min38 min5,428385  1% 0% 0% 100%
17Haskell GHC #4 76.6870.906,288658  86% 17% 3% 3%
19Rust 59.5115.106,9641191  98% 100% 99% 97%
20Ruby 41 min41 min7,260384  91% 9% 0% 2%
22Haskell GHC #2 8 min165.247,740808  81% 81% 80% 81%
22Haskell GHC #5 68.2317.368,080834  100% 99% 99% 96%
24Haskell GHC 12 min9 min8,636553  39% 43% 26% 35%
29Fortran Intel #3 55.7413.9810,5361148  100% 100% 100% 100%
30Perl #2 38 min9 min10,976565  100% 99% 100% 99%
34OCaml #4 0.0116.4912,1601004  100% 100% 100% 100%
38Erlang 13 min201.1413,6921038  99% 97% 99% 98%
42PHP #3 44 min11 min15,1881150  100% 100% 100% 100%
44Erlang HiPE 8 min124.5915,7321038  99% 99% 94% 100%
52Racket 297.55297.5218,840649  1% 41% 0% 59%
54C# Mono #2 48.9748.9819,568564  0% 1% 1% 100%
56Racket #2 272.16272.1420,220903  0% 1% 100% 0%
57F# Mono #4 63.7263.7420,372612  0% 0% 100% 0%
57Racket #3 286.8072.7320,6761096  100% 95% 100% 100%
59F# Mono #2 84.3584.3821,244548  0% 1% 100% 0%
59C# Mono 69.8969.9121,348520  0% 0% 100% 1%
62OCaml #3 0.0116.2522,3081017  100% 100% 100% 100%
64C# Mono #3 87.6822.2922,9601096  97% 99% 98% 99%
64Lisp SBCL #3 73.4973.5123,208821  1% 0% 100% 0%
69F# Mono 144.24144.1324,672551  68% 18% 10% 5%
75Java  70.2517.8127,0481282  98% 99% 99% 99%
79Ruby #2 51 min13 min28,5321426  97% 97% 98% 98%
88Lisp SBCL #4 64.6116.6131,6441518  99% 98% 92% 100%
89F# Mono #3 84.1522.3832,076945  92% 96% 93% 96%
89Lisp SBCL #5 58.7658.7832,156674  1% 1% 1% 100%
98Scala #2 52.1313.3335,1321017  98% 98% 99% 97%
98Dart #2 84.2483.7635,364495  56% 1% 44% 1%
101Java  #2 65.9565.9136,436514  0% 0% 100% 1%
111Scala 90.0389.9939,800459  99% 1% 1% 1%
111Python 3 #2 59 min15 min40,096797  98% 97% 100% 97%
111Python 3 1h 05 min16 min40,1001108  99% 100% 99% 100%
112Python 3 #4 35 min9 min40,176944  98% 99% 98% 99%
193Clojure #3 76.3319.9469,4561491  97% 97% 96% 95%
206Hack 16 min16 min74,060532  1% 0% 0% 100%
212Hack #2 35 min35 min76,304440  37% 28% 0% 35%
216Clojure #2 163.6153.1277,8561088  78% 75% 77% 76%
218Lisp SBCL #2 192.54192.7878,428513  53% 47% 1% 0%
1,876Ruby JRuby 10 min10 min675,384384  11% 30% 47% 15%
1,901Ruby JRuby #2 21 min5 min684,4681426  90% 92% 99% 82%
C++ g++ Failed1059
Haskell GHC #3 Timed Out1h 00 min1153
Hack #3 Failed1150
"wrong" (different) algorithm / less comparable programs
1.0C++ g++ #6 37.8637.87364894
54C# Mono #4 40.2440.2619,568710
69C# Mono #5 46.8912.0024,8681400
75Java  #3 41.0810.4427,1761633
111Python 3 #3 2050.50525.1439,952773
126Lisp SBCL 52.2313.2345,2121607

 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