x64 Ubuntu : Intel® Q6600® quad-core |
Each chart bar shows how many times more Time or how many times more Memory one unidentified ↓ n-body program used, compared to the 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 n-body programs used - sort Memory KB. Compare how much Code the programs used - sort Code B
Column × shows how many times more each program used compared to the 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 | 20.37 | 20.37 | 516 | 1173 | 100% 0% 0% 0% |
| 1.0 | C++ GNU g++ #4 | 20.57 | 20.56 | 932 | 1428 | 0% 0% 0% 100% |
| 1.0 | C GNU gcc #5 | 20.74 | 20.74 | 512 | 1429 | 100% 0% 0% 0% |
| 1.0 | Fortran Intel | 21.24 | 21.24 | 500 | 1389 | 0% 0% 100% 0% |
| 1.0 | Fortran Intel #2 | 21.37 | 21.37 | 496 | 1244 | 0% 0% 100% 0% |
| 1.1 | ATS #2 | 21.83 | 21.83 | 528 | 2088 | 0% 0% 100% 0% |
| 1.1 | Scala | 23.04 | 23.03 | 17,920 | 1420 | 0% 0% 100% 0% |
| 1.1 | Java 6 steady state #2 | 23.11 | 23.11 | 14,952 | 1498 | 81% 0% 0% 19% |
| 1.1 | Java 6 -server #2 | 23.13 | 23.13 | 15,100 | 1424 | 0% 0% 0% 100% |
| 1.1 | Lisp SBCL | 23.13 | 23.14 | 19,544 | 1363 | 100% 0% 1% 0% |
| 1.2 | Ada 2005 GNAT #2 | 24.11 | 24.10 | 1,540 | 1723 | 0% 0% 0% 100% |
| 1.3 | Ada 2005 GNAT | 27.40 | 27.40 | 1,540 | 1608 | 100% 0% 0% 0% |
| 1.5 | Haskell GHC | 31.45 | 31.46 | 2,048 | 1687 | 0% 0% 0% 100% |
| 1.6 | OCaml | 32.69 | 32.70 | 816 | 1239 | 100% 0% 0% 0% |
| 1.6 | Go 6g 8g | 32.73 | 32.74 | 768 | 1329 | 0% 0% 100% 0% |
| 1.6 | Clean | 33.08 | 33.08 | 572 | 1587 | 0% 0% 0% 100% |
| 1.8 | Pascal Free Pascal | 36.33 | 36.34 | 204 | 1308 | 0% 0% 100% 0% |
| 1.8 | C# Mono #2 | 37.38 | 37.38 | 5,724 | 1410 | 0% 0% 100% 0% |
| 2.2 | F# Mono | 45.25 | 45.25 | 8,072 | 1373 | 0% 0% 12% 88% |
| 2.3 | C# Mono | 46.84 | 46.84 | 5,736 | 1403 | 6% 0% 100% 0% |
| 6.8 | Erlang HiPE #3 | 137.81 | 137.81 | 8,764 | 1399 | 100% 0% 0% 0% |
| 9.1 | Scheme PLT | 185.34 | 185.34 | 13,532 | 1558 | 0% 0% 100% 0% |
| 10 | JavaScript V8 | 213.16 | 213.15 | 21,508 | 1287 | 0% 0% 0% 100% |
| 12 | Java 6 -Xint #2 | 237.96 | 238.10 | 12,416 | 1424 | 0% 100% 0% 0% |
| 25 | Lua #2 | 8 min | 8 min | 1,096 | 1265 | 0% 0% 0% 100% |
| 25 | Lua | 8 min | 8 min | 1,112 | 1197 | 62% 37% 0% 0% |
| 51 | PHP #2 | 17 min | 17 min | 4,284 | 1255 | 0% 0% 0% 100% |
| 59 | Python CPython #4 | 19 min | 19 min | 3,832 | 1105 | 100% 0% 0% 0% |
| 68 | Ruby JRuby #2 | 23 min | 23 min | 228,372 | 1137 | 1% 47% 52% 0% |
| 82 | Perl | 27 min | 27 min | 2,568 | 1140 | 0% 0% 100% 0% |
| 107 | PHP | 36 min | 36 min | 4,324 | 1289 | 1% 2% 100% 1% |
| 199 | Ruby MRI #2 | 1h 07 min | 1h 07 min | 2,168 | 1137 | 0% 0% 100% 0% |
| JavaScript TraceMonkey | Failed | 1287 | ||||
| Smalltalk VisualWorks | Failed | 1652 |
ndiff -abserr 1.0e-8 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.