OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
Each chart bar shows how many times more Time or how many times more Memory one unidentified ↓ recursive program used, compared to the benchmark program that used least Time or the program that used least Memory.
This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load.
Compare how much Memory the recursive programs used - sort Memory KB. Compare how much Code the benchmark programs used - sort Code B
Column × shows how many times more each program used compared to the benchmark program that used least.
| sort | sort | sort | sort | |||
|---|---|---|---|---|---|---|
| × | Program Source Code | CPU secs | Elapsed secs | Memory KB | Code B | ≈ CPU Load |
| 1.0 | C GNU gcc | 2.36 | 432 | 547 | ||
| 1.0 | C++ GNU g++ #2 | 2.40 | 1,008 | 566 | ||
| 1.0 | Lisaac | 2.45 | 524 | 590 | ||
| 1.1 | Ada 2005 GNAT #2 | 2.51 | 548 | 598 | ||
| 1.1 | C GNU gcc #2 | 2.54 | 484 | 425 | ||
| 1.1 | Oberon-2 OO2C | 2.54 | 1,784 | 505 | ||
| 1.1 | C++ GNU g++ | 2.59 | 916 | 345 | ||
| 1.1 | Eiffel SmartEiffel | 2.63 | 584 | 579 | ||
| 1.4 | Mercury | 3.23 | 3,720 | 545 | ||
| 1.4 | C Intel | 3.24 | 692 | 547 | ||
| 1.4 | C Intel #2 | 3.28 | 700 | 425 | ||
| 1.6 | Clean #4 | 3.80 | 596 | 422 | ||
| 1.6 | C++ Intel #2 | 3.83 | 724 | 566 | ||
| 1.7 | Mercury #2 | 3.94 | 3,740 | 696 | ||
| 1.7 | Clean #3 | 4.10 | 600 | 427 | ||
| 1.7 | C++ Intel | 4.11 | 512 | 345 | ||
| 1.8 | Pascal Free Pascal | 4.14 | 460 | 462 | ||
| 2.0 | 4.81 | 10,464 | 497 | |||
| 2.5 | CAL | 5.80 | 14,320 | 665 | ||
| 2.7 | D Digital Mars #2 | 6.31 | 1,196 | 349 | ||
| 2.8 | Scala #2 | 6.53 | 20,184 | 411 | ||
| 2.9 | Java 6 -server | 6.76 | 12,044 | 427 | ||
| 2.9 | Java 6 -Xms64m | 6.82 | 12,180 | 427 | ||
| 3.0 | Fortran Intel | 7.17 | 880 | 620 | ||
| 3.2 | OCaml #2 | 7.47 | 1,120 | 389 | ||
| 3.3 | F# Mono | 7.70 | 7,500 | 461 | ||
| 3.4 | BASIC FreeBASIC #2 | 7.94 | 1,068 | 449 | ||
| 3.4 | SML MLton #2 | 7.97 | 1,384 | 453 | ||
| 3.4 | Java GNU gcj | 7.98 | 15,828 | 497 | ||
| 3.4 | Haskell GHC | 8.05 | 1,464 | 447 | ||
| 3.6 | Lisp SBCL #3 | 8.45 | 17,460 | 523 | ||
| 3.7 | Scheme Chicken | 8.68 | 2,384 | 467 | ||
| 3.7 | Forth bigForth | 8.77 | 872 | 413 | ||
| 3.9 | C# Mono | 9.22 | 5,060 | 435 | ||
| 4.0 | SML SML/NJ | 9.42 | 5,244 | 585 | ||
| 4.0 | Java 6 -client | 9.43 | 10,716 | 427 | ||
| 4.6 | Scheme Ikarus | 10.81 | 20,880 | 564 | ||
| 4.6 | Nice | 10.86 | 24,328 | 377 | ||
| 4.6 | Nice #2 | 10.89 | 23,792 | 393 | ||
| 4.7 | Fortran G95 | 10.98 | 1,244 | 620 | ||
| 8.1 | Scheme PLT | 19.07 | 6,988 | 579 | ||
| 8.4 | Scheme PLT #2 | 19.82 | 7,708 | 427 | ||
| 11 | Erlang HiPE #2 | 26.45 | 4,856 | 392 | ||
| 15 | Python Psyco | 36.12 | 3,420 | 354 | ||
| 18 | Forth GNU GForth | 43.30 | 956 | 493 | ||
| 21 | Lua LuaJIT | 48.67 | 2,912 | 330 | ||
| 24 | Java 6 -Xint | 55.66 | 10,520 | 427 | ||
| 38 | Mozart/Oz | 89.35 | 5,192 | 574 | ||
| 40 | Mozart/Oz #2 | 93.06 | 6,100 | 500 | ||
| 47 | Prolog YAP | 111.65 | 22,820 | 493 | ||
| 49 | Lua | 114.38 | 2,280 | 330 | ||
| 66 | Pike | 154.91 | 5,312 | 403 | ||
| 69 | Smalltalk VisualWorks | 161.83 | 32,764 | 509 | ||
| 80 | Python IronPython | 187.65 | 19,588 | 360 | ||
| 146 | Prolog SWI | 5 min | 3,320 | 587 | ||
| 238 | Groovy | 9 min | 63,848 | 361 | ||
| 290 | Python CPython | 11 min | 14,296 | 360 | ||
| 305 | Ruby JRuby #2 | 11 min | 49,096 | 301 | ||
| 373 | PHP #2 | 14 min | 18,088 | 315 | ||
| 381 | Perl #2 | 14 min | 10,836 | 380 | ||
| 543 | Tcl | 21 min | 24,908 | 461 | ||
| 629 | Ruby MRI #2 | 24 min | 48,360 | 301 | ||
| 636 | Smalltalk Squeak | 24 min | 20,736 | 505 | ||
| 7,140 | Io | 4h 40 min | 58,540 | 331 | ||
| C CINT | Timed Out | 403 | ||||
| Erlang HiPE | Failed | 356 | ||||
| Erlang HiPE #3 | Failed | 373 | ||||
| Icon | Failed | 311 | ||||
| JavaScript Rhino | Failed | 306 | ||||
| JavaScript SpiderMonkey | Failed | 306 | ||||
| Rebol | Failed | 504 | ||||
| Ruby 1.9 #2 | Failed | 301 | ||||
| Scala | Failed | 420 | ||||
| Smalltalk GNU | Failed | 510 | ||||
| Zonnon Mono | Failed | 493 |
diff program output N = 3 with this output file to check your program is correct before contributing.
Each program should use the same naïve recursive-algorithms to calculate 3 simple numeric functions: ackermann, fibonnaci and tak.
Ack(x,y) x = 0 = y+1 y = 0 = Ack(x-1,1) otherwise = Ack(x-1, Ack(x,y-1)) Fib(n) n < 2 = 1 otherwise = Fib(n-2) + Fib(n-1) Tak(x,y,z) y < x = Tak(Tak(x-1.0,y,z),Tak(y-1.0,z,x),Tak(z-1.0,x,y)) otherwise = z
For this benchmark, the fibonnaci and tak implementations should either provide separate functions - one for integer calculation and one for double calculation - or provide a function that uses integer calculation with integer parameters and double calculation with double parameters.
The Ackermann benchmark is described in Timing Trials, or, the Trials of Timing: Experiments with Scripting and User-Interface Languages.
For more information see Eric W. Weisstein, "Ackermann Function." From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/AckermannFunction.html
For a different version of the Fibonacci function see Eric W. Weisstein, "Fibonacci Number." From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/FibonacciNumber.html
The tak benchmark is described in Performance and Evaluation of Lisp Systems, Richard P. Gabriel, 1985, page 81. (1.1MB pdf)
For more information see Eric W. Weisstein, "TAK Function." From MathWorld--A Wolfram Web Resource.
http://mathworld.wolfram.com/TAKFunction.html