x64 Ubuntu : Intel® Q6600® one 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 | 488 | 1173 | 0% 0% 0% 100% |
| 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 | 488 | 1429 | 0% 0% 0% 100% |
| 1.0 | Fortran Intel | 21.25 | 21.24 | 496 | 1389 | 0% 1% 0% 100% |
| 1.0 | Fortran Intel #2 | 21.37 | 21.37 | 492 | 1244 | 0% 0% 0% 100% |
| 1.1 | ATS #2 | 21.84 | 21.84 | 528 | 2088 | 0% 0% 0% 100% |
| 1.1 | Java 6 steady state #2 | 23.07 | 23.06 | 14,936 | 1498 | 0% 0% 0% 100% |
| 1.1 | Scala | 23.07 | 23.08 | 17,864 | 1420 | 0% 0% 0% 100% |
| 1.1 | Lisp SBCL | 23.13 | 23.13 | 19,560 | 1363 | 0% 0% 0% 100% |
| 1.1 | Java 6 -server #2 | 23.18 | 23.18 | 15,088 | 1424 | 0% 0% 0% 100% |
| 1.2 | Ada 2005 GNAT #2 | 24.10 | 24.10 | 1,540 | 1723 | 0% 0% 0% 100% |
| 1.3 | Ada 2005 GNAT | 27.42 | 27.42 | 1,536 | 1608 | 0% 0% 0% 100% |
| 1.5 | Haskell GHC | 31.44 | 31.44 | 2,056 | 1687 | 0% 0% 0% 100% |
| 1.6 | OCaml | 32.65 | 32.65 | 816 | 1239 | 0% 0% 0% 100% |
| 1.6 | Go 6g 8g | 32.72 | 32.72 | 768 | 1329 | 0% 0% 0% 100% |
| 1.6 | Clean | 33.13 | 33.13 | 568 | 1587 | 0% 1% 0% 100% |
| 1.8 | Pascal Free Pascal | 36.46 | 36.45 | 204 | 1308 | 0% 0% 0% 100% |
| 1.8 | C# Mono #2 | 37.38 | 37.38 | 5,732 | 1410 | 0% 0% 0% 100% |
| 2.2 | F# Mono | 44.87 | 44.87 | 8,104 | 1373 | 0% 0% 0% 100% |
| 2.3 | C# Mono | 46.83 | 46.83 | 5,732 | 1403 | 0% 1% 5% 100% |
| 6.2 | Erlang HiPE #3 | 126.34 | 126.34 | 7,956 | 1399 | 2% 0% 100% 0% |
| 9.1 | Scheme PLT | 185.92 | 185.91 | 13,536 | 1558 | 0% 0% 0% 100% |
| 11 | JavaScript V8 | 230.73 | 230.71 | 21,480 | 1287 | 0% 0% 0% 100% |
| 13 | Java 6 -Xint #2 | 257.48 | 257.49 | 12,400 | 1424 | 0% 0% 0% 100% |
| 25 | Lua | 8 min | 8 min | 1,108 | 1197 | 1% 0% 0% 100% |
| 25 | Lua #2 | 8 min | 8 min | 1,096 | 1265 | 0% 0% 0% 100% |
| 52 | PHP #2 | 17 min | 17 min | 4,284 | 1255 | 0% 0% 0% 100% |
| 62 | Python CPython #4 | 21 min | 21 min | 3,832 | 1105 | 0% 0% 0% 100% |
| 69 | Ruby JRuby #2 | 23 min | 23 min | 134,624 | 1137 | 0% 0% 0% 100% |
| 80 | Perl | 27 min | 27 min | 2,572 | 1140 | 0% 0% 0% 100% |
| 106 | PHP | 36 min | 36 min | 4,324 | 1289 | 0% 0% 0% 100% |
| 199 | Ruby MRI #2 | 1h 07 min | 1h 07 min | 2,168 | 1137 | 0% 0% 0% 100% |
| 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.