/mobile Handheld Friendly website

 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.0ATS #2 51.4751.493641571  0% 0% 0% 100%
1.0ATS 51.7551.763641306  0% 100% 0% 0%
1.0C++ g++ #3 53.4153.43372593  0% 0% 100% 0%
1.0C++ g++ #7 22.5422.553721150  0% 13% 87% 0%
1.0C gcc #4 22.7022.703721183  0% 0% 0% 100%
1.0C gcc 71.6071.62376508  0% 0% 0% 100%
1.0C gcc #3 50.3550.37376567  0% 0% 0% 100%
1.1C gcc #2 48.3812.424121557  98% 93% 98% 100%
1.4Fortran Intel 58.8258.84520590  0% 0% 0% 100%
2.1OCaml 106.88106.91752524  0% 0% 100% 0%
2.1OCaml #2 91.9992.02752473  0% 0% 0% 100%
2.3Pascal Free Pascal 75.3418.878321018  100% 100% 100% 100%
3.1C++ g++ 54.8614.031,1441059  100% 97% 97% 98%
3.4C++ g++ #5 47.9512.291,2361440  100% 93% 100% 98%
3.4C++ g++ #4 60.1515.361,2401439  98% 100% 97% 97%
3.5Go 73.5718.491,276900  100% 99% 99% 99%
5.1Perl 43 min43 min1,864457  0% 0% 0% 100%
5.4Ada 2005 GNAT #3 38.189.581,9762100  100% 100% 100% 100%
6.4Haskell GHC #4 75.4868.672,336658  15% 42% 43% 10%
8.8PHP #2 49 min49 min3,188441  19% 74% 0% 7%
8.9PHP 57 min57 min3,228482  59% 37% 4% 0%
11Haskell GHC 18 min12 min3,876553  39% 32% 48% 32%
13Lisp SBCL #2 86.7386.764,780513  0% 0% 100% 0%
16Haskell GHC #2 12 min223.875,824808  81% 81% 81% 81%
17Python 3 #6 38 min38 min6,148385  100% 0% 0% 0%
17Ruby 2.0 53 min53 min6,152384  0% 100% 0% 0%
24Fortran Intel #3 51.2012.848,5641148  100% 100% 100% 100%
24Dart 26 min26 min8,656531  51% 49% 0% 0%
25Dart #2 82.4582.478,988538  0% 100% 0% 0%
32OCaml #4 0.0016.3611,5521004  100% 100% 100% 100%
32Erlang 13 min203.7611,7961038  100% 98% 100% 100%
35Erlang HiPE 8 min125.7312,8721038  99% 100% 97% 97%
39C# Mono 104.66104.6814,100520  0% 0% 0% 100%
39C# Mono #2 67.2467.2614,364564  99% 0% 0% 0%
40PHP #3 48 min12 min14,6881150  100% 100% 100% 100%
42F# Mono #2 97.8497.8715,152548  96% 0% 0% 4%
42F# Mono 9 min7 min15,420551  20% 39% 41% 21%
43C# Mono #3 110.7828.1415,5881096  99% 100% 98% 97%
48Java 7  51.9013.1517,3481282  99% 99% 98% 98%
48Java 7  #2 73.6373.5917,476514  100% 0% 0% 0%
50Racket 298.70298.7018,092649  0% 0% 0% 100%
51F# Mono #3 125.3032.8218,464945  95% 98% 91% 98%
57Lisp SBCL #3 63.3663.3820,624821  0% 0% 100% 0%
58OCaml #3 0.0116.4021,0121017  100% 100% 100% 100%
58Lisp SBCL #4 53.4213.8121,1881518  98% 99% 97% 93%
63Scala 87.3687.3222,912459  100% 0% 0% 0%
70Scala #2 55.3514.1325,6041017  98% 97% 99% 98%
100Python 3 #2 59 min15 min36,288797  99% 100% 97% 99%
100Python 3 1h 06 min16 min36,3881108  100% 98% 100% 99%
152Clojure #2 156.2048.9655,2161088  80% 79% 77% 79%
1,642Ruby JRuby 14 min14 min597,824384  83% 17% 0% 0%
Haskell GHC #3 Timed Out1h 00 min1153
"wrong" (different) algorithm / less comparable programs
1.0C++ g++ #6 40.5340.55372894
3.3C++ g++ #2 31.558.001,2162106
53Java 7  #3 44.5711.2719,4081633
74Lisp SBCL 44.2011.1426,8441607

 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