OUT-OF-DATE! Read http://shootout.alioth.debian.org/ |
↓ Double-precision N-body simulation, N=20,000,000.
Which program used most Memory? Which used least Code? Sort the data. Find several programs written for the same language implementation - how different are Time-used, Memory-used, Code-used? Which programs use highly optimised assembly code libraries? Which programs make use of all the processor cores?
| sort | sort | sort | sort | |||
|---|---|---|---|---|---|---|
| × | Program & Logs | CPU secs | Elapsed secs | Memory KB | Code B | ~ CPU Load |
| 1.0 | C++ GNU g++ #2 | 12.78 | 936 | 1705 | ||
| 1.1 | Oberon-2 OO2C | 14.27 | 3,116 | 1465 | ||
| 1.1 | Eiffel SmartEiffel | 14.33 | 532 | 1465 | ||
| 1.2 | C GNU gcc | 15.40 | 3,100 | 1173 | ||
| 1.2 | C++ GNU g++ | 15.55 | 864 | 1349 | ||
| 1.3 | D GNU | 17.18 | 3,088 | 1308 | ||
| 1.4 | Clean | 17.36 | 508 | 1722 | ||
| 1.4 | Objective-C GNU | 17.38 | 3,100 | 1489 | ||
| 1.4 | D Digital Mars | 17.39 | 3,088 | 1308 | ||
| 1.4 | D GNU #2 | 17.43 | 3,088 | 1193 | ||
| 1.4 | Lisp SBCL | 17.72 | 9,100 | 1363 | ||
| 1.4 | Java GNU gcj | 18.00 | 21,200 | 1430 | ||
| 1.4 | D Digital Mars #2 | 18.23 | 3,088 | 1193 | ||
| 1.5 | Java 6 -client | 18.67 | 12,228 | 1430 | ||
| 1.6 | Pascal Free Pascal | 19.82 | 3,104 | 1308 | ||
| 1.6 | Fortran G95 | 19.99 | 3,096 | 1389 | ||
| 1.6 | Ada 2005 GNAT | 20.18 | 1,236 | 1608 | ||
| 1.6 | SML MLton #2 | 20.42 | 3,116 | 1327 | ||
| 1.8 | SML SML/NJ | 22.81 | 3,584 | 1314 | ||
| 1.8 | C# Mono #2 | 23.22 | 5,236 | 1410 | ||
| 1.9 | Dylan Gwydion | 24.37 | 2,268 | 1543 | ||
| 2.1 | Haskell GHC #4 | 27.38 | 2,012 | 1687 | ||
| 2.2 | Java 1.4 -server | 27.49 | 10,300 | 1404 | ||
| 2.2 | Java 6 -server | 27.54 | 10,888 | 1430 | ||
| 2.2 | Scala #2 | 28.51 | 15,476 | 1430 | ||
| 2.3 | Haskell GHC | 29.83 | 3,096 | 1687 | ||
| 2.5 | Nice #2 | 31.78 | 14,168 | 1313 | ||
| 2.5 | Nice | 32.27 | 14,172 | 1304 | ||
| 2.6 | C# Mono | 32.92 | 5,232 | 1403 | ||
| 2.7 | Icon | 34.41 | 3,988 | 1287 | ||
| 2.8 | OCaml | 35.65 | 620 | 1239 | ||
| 2.8 | C Tiny | 36.23 | 400 | 1173 | ||
| 11 | Erlang HiPE #3 | 135.70 | 4,480 | 1399 | ||
| 13 | Python Psyco #4 | 167.19 | 3,708 | 1185 | ||
| 23 | Forth GNU GForth | 292.20 | 888 | 1304 | ||
| 25 | Scheme Chicken | 5 min | 3,088 | 1394 | ||
| 26 | Scheme Chicken #3 | 5 min | 3,088 | 1337 | ||
| 29 | Rexx Regina | 6 min | 48,624 | 1517 | ||
| 36 | Parrot PIR #2 | 7 min | 4,216 | 1976 | ||
| 44 | Lua #2 | 9 min | 8,296 | 1265 | ||
| 49 | Java 6 -Xint | 10 min | 8,676 | 1430 | ||
| 50 | OCaml (bytecode) | 10 min | 1,172 | 1239 | ||
| 95 | Mozart/Oz | 20 min | 4,820 | 1444 | ||
| 100 | Scheme Bigloo | 21 min | 5,396 | 1549 | ||
| 106 | Python CPython #2 | 22 min | 3,140 | 1027 | ||
| 111 | JavaScript JavaScriptCore | 23 min | 3,112 | 1287 | ||
| 121 | Smalltalk GNU | 25 min | 6,912 | 1657 | ||
| 123 | Perl | 26 min | 1,904 | 1140 | ||
| 127 | Python CPython | 26 min | 3,140 | 1072 | ||
| 184 | Parrot PIR | 39 min | 4,248 | 1713 | ||
| 186 | Python IronPython | 39 min | 16,400 | 1072 | ||
| 191 | JavaScript SpiderMonkey | 40 min | 66,580 | 1287 | ||
| 194 | Python IronPython #2 | 41 min | 17,156 | 1027 | ||
| 197 | S-Lang | 41 min | 1,324 | 1357 | ||
| 217 | PHP | 46 min | 6,268 | 1289 | ||
| 264 | Tcl #2 | 56 min | 1,500 | 1454 | ||
| 277 | Scheme PLT | 58 min | 4,764 | 1544 | ||
| 390 | Ruby MRI #2 | 1h 22 min | 1,712 | 1137 | ||
| 585 | Prolog SWI | 2h 04 min | 2,540 | 1586 | ||
| Dylan Gwydion #2 | Failed | 1544 | ||||
| Forth bigForth | Failed | 1359 | ||||
| Io | Failed | 1106 | ||||
| Pike | Failed | 1260 | ||||
| Scheme Bigloo #2 | Failed | 1695 | ||||
| interesting alternative programs | ||||||
| C Tiny #2 | Failed | 1186 | ||||
| 1.1 | C GNU gcc #2 | 14.67 | 0.00 | 3,104 | 1186 | |
| 59 | S-Lang #2 | 750.43 | 0.00 | 1,344 | 1439 | |
| missing programs | ||||||
| C Cyclone | No program | |||||
| Matlab GNU Octave | No program | |||||
ndiff program output N = 1000 with this output file to check your program is correct before contributing.
Each program should model the orbits of Jovian planets, using the same simple symplectic-integrator - see the Java program.
For background information see N-body problem. Useful symplectic integrators are freely available, for example the HNBody Symplectic Integration Package.
Thanks to Mark C. Lewis for this benchmark.