/mobile Handheld Friendly website
x64 Ubuntu : Intel® Q6600® one core |
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.
| sort | sort | sort | ||||
| × | Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
|---|---|---|---|---|---|---|
| 1.0 | C++ g++ #7 | 22.53 | 22.54 | 372 | 1150 | 0% 0% 0% 100% |
| 1.0 | C gcc #4 | 22.69 | 22.70 | 372 | 1183 | 0% 0% 0% 100% |
| 1.7 | Ada 2005 GNAT #3 | 38.17 | 38.20 | 1,960 | 2100 | 0% 0% 0% 100% |
| 2.0 | C# Mono #2 | 44.82 | 44.83 | 13,844 | 564 | 0% 0% 0% 100% |
| 2.1 | C++ g++ #5 | 47.93 | 47.95 | 1,240 | 1440 | 0% 0% 0% 100% |
| 2.1 | C gcc #2 | 48.41 | 48.43 | 412 | 1557 | 0% 0% 0% 100% |
| 2.2 | Fortran Intel #3 | 48.97 | 48.99 | 7,596 | 1148 | 0% 0% 0% 100% |
| 2.2 | C gcc #3 | 50.35 | 50.37 | 372 | 567 | 0% 0% 0% 100% |
| 2.3 | ATS #2 | 51.46 | 51.48 | 360 | 1571 | 0% 0% 0% 100% |
| 2.3 | ATS | 51.72 | 51.73 | 364 | 1306 | 0% 0% 0% 100% |
| 2.3 | Lisp SBCL #4 | 52.62 | 52.64 | 21,204 | 1518 | 0% 0% 0% 100% |
| 2.4 | C++ g++ #3 | 53.38 | 53.39 | 372 | 593 | 0% 0% 0% 100% |
| 2.4 | C++ g++ | 54.82 | 54.84 | 1,140 | 1059 | 0% 0% 0% 100% |
| 2.6 | Fortran Intel | 57.62 | 57.64 | 244 | 590 | 0% 0% 0% 100% |
| 2.7 | C++ g++ #4 | 60.10 | 60.12 | 1,240 | 1439 | 0% 0% 0% 100% |
| 2.7 | Lisp SBCL #3 | 60.93 | 60.95 | 20,632 | 821 | 0% 0% 0% 100% |
| 2.7 | Scala #2 | 61.36 | 61.38 | 25,268 | 1017 | 0% 0% 0% 100% |
| 2.8 | F# Mono #3 | 62.14 | 62.16 | 20,428 | 945 | 0% 0% 0% 100% |
| 2.9 | OCaml #4 | 0.00 | 65.32 | 11,296 | 1004 | 0% 0% 0% 100% |
| 2.9 | OCaml #3 | 0.00 | 65.48 | 21,008 | 1017 | 0% 0% 0% 100% |
| 2.9 | Haskell GHC #4 | 66.34 | 66.36 | 1,972 | 658 | 0% 0% 0% 100% |
| 3.1 | Java 7 | 70.18 | 70.20 | 17,168 | 1282 | 0% 0% 0% 100% |
| 3.2 | C gcc | 71.59 | 71.61 | 376 | 508 | 0% 0% 0% 100% |
| 3.2 | C# Mono #3 | 72.41 | 72.43 | 15,060 | 1096 | 0% 0% 0% 100% |
| 3.3 | Go | 73.61 | 73.64 | 1,276 | 900 | 0% 0% 0% 100% |
| 3.3 | Pascal Free Pascal | 75.35 | 75.37 | 824 | 1018 | 0% 0% 0% 100% |
| 3.4 | Java 7 #2 | 76.62 | 76.64 | 17,560 | 514 | 0% 0% 0% 100% |
| 3.5 | JavaScript V8 #3 | 78.67 | 78.70 | 6,312 | 539 | 0% 0% 0% 100% |
| 3.5 | C# Mono | 79.41 | 79.43 | 13,844 | 520 | 0% 0% 0% 100% |
| 3.6 | F# Mono #2 | 80.07 | 80.09 | 17,004 | 548 | 0% 0% 0% 100% |
| 3.7 | Dart #2 | 82.44 | 82.46 | 8,988 | 538 | 0% 0% 0% 100% |
| 3.8 | JavaScript V8 #2 | 84.82 | 84.84 | 6,272 | 472 | 0% 0% 0% 100% |
| 3.8 | Lisp SBCL #2 | 86.70 | 86.72 | 4,780 | 513 | 0% 0% 0% 100% |
| 4.1 | OCaml #2 | 91.99 | 92.01 | 748 | 473 | 0% 0% 0% 100% |
| 4.2 | JavaScript V8 | 94.74 | 94.78 | 6,292 | 463 | 0% 0% 0% 100% |
| 4.2 | Scala | 94.96 | 94.99 | 22,952 | 459 | 0% 0% 0% 100% |
| 4.7 | OCaml | 106.85 | 106.87 | 752 | 524 | 0% 0% 0% 100% |
| 5.9 | Clojure #2 | 132.60 | 132.69 | 53,624 | 1088 | 0% 0% 0% 100% |
| 13 | Haskell GHC #2 | 288.46 | 288.56 | 3,376 | 808 | 0% 0% 0% 100% |
| 14 | Racket | 5 min | 5 min | 18,008 | 649 | 0% 0% 0% 100% |
| 14 | F# Mono | 5 min | 5 min | 15,004 | 551 | 0% 0% 0% 100% |
| 20 | Erlang HiPE | 7 min | 7 min | 11,624 | 1038 | 0% 0% 0% 100% |
| 26 | Haskell GHC | 9 min | 9 min | 3,360 | 553 | 0% 0% 0% 100% |
| 31 | Smalltalk VisualWorks | 11 min | 11 min | 42,580 | 838 | 0% 0% 0% 100% |
| 36 | Ruby JRuby | 13 min | 13 min | 599,808 | 384 | 0% 0% 0% 100% |
| 71 | Dart | 26 min | 26 min | 8,660 | 531 | 0% 0% 0% 100% |
| 94 | Lua | 35 min | 35 min | 1,016 | 462 | 0% 0% 0% 100% |
| 102 | Perl | 38 min | 38 min | 1,836 | 457 | 0% 0% 0% 100% |
| 104 | Python 3 #6 | 39 min | 39 min | 6,152 | 385 | 0% 0% 0% 100% |
| 134 | PHP #3 | 50 min | 50 min | 14,716 | 1150 | 0% 0% 0% 100% |
| 138 | PHP #2 | 51 min | 51 min | 3,188 | 441 | 0% 0% 0% 100% |
| 148 | Ruby 2.0 | 55 min | 55 min | 6,148 | 384 | 0% 0% 0% 100% |
| 156 | PHP | 58 min | 58 min | 3,232 | 482 | 0% 0% 0% 100% |
| Haskell GHC #3 | Timed Out | 1h 00 min | 1153 | |||
| Python 3 | Timed Out | 1h 00 min | 1108 | |||
| Python 3 #2 | Timed Out | 1h 00 min | 797 | |||
| "wrong" (different) algorithm / less comparable programs | ||||||
| 1.4 | C++ g++ #2 | 31.52 | 31.54 | 1,196 | 2106 | |
| 1.8 | C++ g++ #6 | 40.52 | 40.54 | 376 | 894 | |
| 2.0 | Lisp SBCL | 44.14 | 44.15 | 26,848 | 1607 | |
| 2.1 | Java 7 #3 | 47.96 | 47.98 | 19,468 | 1633 | |
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 -
task = taskId.getAndIncrement();
idxMin = task * CHUNKSZ;
idxMax = min( idxMin + CHUNKSZ, n! );