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.

     sortsortsort
  ×   Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
1.0OCaml #3 0.0069.3021,4001017  0% 0% 0% 100%
1.0OCaml #4 0.0065.0211,4161004  0% 0% 0% 100%
5,665C++ g++ #7 22.6622.673601150  1% 1% 0% 100%
5,677C gcc #4 22.7122.723961183  1% 0% 0% 100%
9,567Ada 2005 GNAT #3 38.2738.301,9602100  1% 0% 1% 100%
12,243Fortran Intel #3 48.9748.997,5961148  0% 0% 0% 100%
12,525C# Mono #2 50.1050.1219,608564  1% 0% 0% 100%
13,108C gcc #3 52.4352.45396567  1% 0% 0% 100%
13,322C++ g++ #5 53.2953.311,2721440  1% 1% 0% 100%
13,388C++ g++ #4 53.5553.571,2721439  1% 1% 1% 100%
13,863C gcc #2 55.4555.474241557  0% 1% 1% 100%
14,405Fortran Intel 57.6257.64244590  0% 0% 0% 100%
14,520Scala #2 58.0858.1026,2161017  1% 1% 1% 100%
14,764C++ g++ #3 59.0659.08364593  1% 0% 0% 100%
14,870Lisp SBCL #5 59.4859.5034,464674  0% 0% 0% 100%
15,779C gcc 63.1263.14392508  1% 0% 1% 100%
15,891F# Mono #4 63.5663.5920,356612  1% 0% 0% 100%
16,269Lisp SBCL #4 65.0865.1034,0081518  0% 1% 1% 100%
16,384Haskell GHC #5 65.5465.562,364834  0% 1% 1% 100%
16,802Go 67.2167.241,032900  0% 1% 1% 100%
16,971Haskell GHC #4 67.8867.912,108658  0% 1% 1% 100%
17,222Java  68.8968.9119,8921282  1% 1% 1% 100%
17,583C# Mono 70.3370.3619,344520  1% 0% 0% 100%
17,788Clojure #3 71.1571.1860,4001491  0% 0% 1% 100%
17,954Rust 71.8271.8531,656644  3% 1% 0% 100%
18,275Java  #2 73.1073.1319,920514  0% 0% 0% 100%
18,531Lisp SBCL #3 74.1274.1523,516821  1% 0% 0% 100%
18,917JavaScript V8 #3 75.6775.707,528539  1% 0% 1% 100%
20,134JavaScript V8 #2 80.5480.577,516472  1% 1% 0% 100%
20,211Dart #2 80.8480.89173,748495  1% 1% 0% 100%
20,688F# Mono #2 82.7582.7821,572548  1% 0% 0% 100%
20,990F# Mono #3 83.9684.1134,656945  1% 1% 1% 100%
21,819Pascal Free Pascal 87.2887.317521018  1% 0% 0% 100%
22,086C# Mono #3 88.3488.3822,9521096  1% 0% 0% 100%
22,518Scala 90.0790.1023,940459  0% 0% 0% 100%
22,596OCaml #2 90.3890.41760473  0% 0% 0% 100%
23,029JavaScript V8 92.1292.157,500463  1% 0% 1% 100%
26,593OCaml 106.37106.41764524  0% 0% 0% 100%
35,256F# Mono 141.02141.1924,620551  0% 1% 1% 100%
38,948Clojure #2 155.79155.9063,6401088  1% 1% 1% 100%
46,905Lisp SBCL #2 187.62187.9278,260513  0% 1% 1% 100%
62,295Haskell GHC #2 249.18249.283,564808  0% 1% 1% 100%
68,001Racket #2 272.01272.0820,224903  0% 0% 1% 100%
74,017Racket #3 296.07296.1420,8041096  0% 1% 1% 100%
74,349Racket 297.40297.4818,820649  0% 0% 1% 100%
110,798Erlang HiPE 7 min7 min11,6241038  0% 0% 0% 100%
118,521Haskell GHC 7 min7 min3,504553  0% 1% 1% 100%
172,557Smalltalk VisualWorks 11 min11 min42,580838  0% 0% 0% 100%
193,244Ruby JRuby 12 min12 min649,516384  0% 0% 0% 100%
227,408Hack 15 min15 min55,344532  1% 0% 0% 100%
527,813Lua 35 min35 min1,016462  0% 0% 0% 100%
571,856Perl 38 min38 min1,836457  0% 0% 0% 100%
583,250Python 3 #6 38 min38 min5,416385  1% 0% 0% 100%
590,240Ruby 39 min39 min7,512384  0% 0% 0% 100%
739,698PHP #2 49 min49 min3,264441  0% 0% 0% 100%
754,670PHP #3 50 min50 min15,5601150  0% 0% 0% 100%
839,370PHP 55 min55 min3,316482  0% 0% 0% 100%
887,901Python 3 #2 59 min59 min40,080797  0% 0% 1% 100%
C++ g++ Failed1059
Haskell GHC #3 Timed Out5 min1153
Hack #2 Timed Out1h 20 min440
Hack #3 Failed1150
Perl #2 Failed565
Python 3 Timed Out1h 00 min1108
"wrong" (different) algorithm / less comparable programs
9,466C++ g++ #6 37.8637.88364894
10,327C# Mono #5 41.3141.3324,5361400
10,647C# Mono #4 42.5942.6119,608710
10,998Java  #3 43.9944.0121,0441633
13,128Lisp SBCL 52.5152.5443,6881607

 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