/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® one core |
Each chart bar shows how many times slower, one ↓ n-body 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 gcc #4 | 9.08 | 9.09 | 336 | 1490 | 0% 0% 0% 100% |
| 1.1 | C++ g++ #3 | 10.42 | 10.43 | 620 | 1763 | 0% 1% 1% 100% |
| 1.2 | C++ g++ #5 | 10.55 | 10.56 | 620 | 1749 | 0% 1% 1% 100% |
| 1.7 | Ada 2005 GNAT #5 | 15.00 | 15.01 | 1,232 | 2427 | 0% 0% 0% 100% |
| 2.2 | Fortran Intel #2 | 20.05 | 20.06 | 520 | 1496 | 0% 0% 1% 100% |
| 2.2 | Fortran Intel | 20.34 | 20.35 | 260 | 1389 | 0% 0% 1% 100% |
| 2.3 | C++ g++ #6 | 20.60 | 20.61 | 336 | 1668 | 0% 0% 0% 100% |
| 2.3 | ATS #2 | 20.65 | 20.65 | 320 | 1920 | 0% 1% 0% 100% |
| 2.3 | C gcc | 20.77 | 20.78 | 336 | 1173 | 0% 0% 0% 100% |
| 2.3 | C++ g++ #4 | 20.79 | 20.80 | 292 | 1428 | 0% 0% 0% 100% |
| 2.3 | C++ g++ | 20.93 | 20.94 | 336 | 1659 | 0% 0% 0% 100% |
| 2.3 | C gcc #6 | 20.98 | 20.99 | 336 | 1180 | 0% 0% 0% 100% |
| 2.5 | C gcc #2 | 22.34 | 22.36 | 336 | 1263 | 0% 0% 0% 100% |
| 2.5 | Fortran Intel #4 | 22.89 | 22.89 | 252 | 1172 | 0% 0% 0% 100% |
| 2.5 | Fortran Intel #3 | 22.89 | 22.90 | 256 | 1299 | 0% 1% 0% 100% |
| 2.5 | C gcc #5 | 22.98 | 22.99 | 292 | 1429 | 1% 0% 1% 100% |
| 2.5 | C# Mono #3 | 23.09 | 23.09 | 14,048 | 1305 | 0% 0% 0% 100% |
| 2.6 | C# Mono #2 | 23.34 | 23.35 | 14,052 | 1410 | 1% 0% 0% 100% |
| 2.6 | Ada 2005 GNAT #3 | 23.54 | 23.55 | 1,236 | 1740 | 0% 0% 0% 100% |
| 2.6 | Haskell GHC #2 | 23.68 | 23.69 | 1,840 | 1874 | 0% 0% 0% 100% |
| 2.6 | C gcc #3 | 23.84 | 23.85 | 336 | 1208 | 0% 0% 0% 100% |
| 2.6 | Scala | 23.91 | 23.91 | 18,756 | 1358 | 0% 0% 0% 100% |
| 2.7 | Java 7 #2 | 24.40 | 24.41 | 13,996 | 1424 | 0% 0% 0% 100% |
| 2.9 | Ada 2005 GNAT | 26.02 | 26.03 | 1,236 | 1608 | 0% 0% 0% 100% |
| 2.9 | Haskell GHC | 26.03 | 26.04 | 1,848 | 1695 | 0% 0% 0% 100% |
| 3.1 | C# Mono #6 | 28.19 | 28.20 | 14,052 | 1289 | 0% 0% 0% 100% |
| 3.8 | Pascal Free Pascal | 34.71 | 34.73 | 8 | 1308 | 0% 0% 0% 100% |
| 3.8 | F# Mono | 34.93 | 34.94 | 17,948 | 1259 | 1% 0% 0% 100% |
| 3.9 | Go | 35.70 | 35.71 | 1,004 | 1310 | 0% 1% 0% 100% |
| 4.1 | Pascal Free Pascal #2 | 37.21 | 37.23 | 8 | 1322 | 0% 0% 0% 100% |
| 4.1 | Lisp SBCL #2 | 37.55 | 37.56 | 4,084 | 1398 | 0% 0% 0% 100% |
| 4.3 | C# Mono | 39.49 | 39.50 | 14,316 | 1403 | 0% 0% 0% 100% |
| 4.5 | JavaScript V8 #2 | 41.28 | 41.30 | 5,960 | 1527 | 0% 0% 0% 100% |
| 4.7 | Clojure | 42.82 | 42.84 | 67,492 | 2162 | 0% 0% 0% 100% |
| 4.7 | JavaScript V8 | 42.92 | 42.94 | 6,072 | 1287 | 0% 0% 0% 100% |
| 5.2 | Pascal Free Pascal #3 | 47.44 | 47.45 | 8 | 1418 | 0% 0% 0% 100% |
| 5.2 | Lisp SBCL | 47.45 | 47.47 | 4,084 | 1363 | 0% 0% 0% 100% |
| 5.2 | OCaml | 47.65 | 47.67 | 580 | 1239 | 0% 0% 0% 100% |
| 6.1 | Racket #2 | 55.22 | 55.25 | 17,264 | 1689 | 0% 0% 0% 100% |
| 10 | Dart #2 | 93.21 | 93.33 | 38,840 | 1297 | 0% 0% 0% 100% |
| 12 | Dart | 105.28 | 105.42 | 38,972 | 1689 | 0% 0% 0% 100% |
| 13 | Racket | 119.78 | 119.86 | 20,412 | 1496 | 0% 0% 0% 100% |
| 18 | Erlang HiPE #3 | 167.57 | 167.61 | 7,632 | 1399 | 0% 0% 0% 100% |
| 29 | Smalltalk VisualWorks | 263.11 | 263.24 | 21,956 | 1652 | 0% 0% 0% 100% |
| 51 | Lua #2 | 7 min | 7 min | 836 | 1193 | 0% 0% 0% 100% |
| 52 | Lua #4 | 7 min | 7 min | 836 | 1305 | 0% 0% 0% 100% |
| 57 | Lua | 8 min | 8 min | 836 | 1201 | 0% 0% 0% 100% |
| 62 | Ruby JRuby #2 | 9 min | 9 min | 585,428 | 1137 | 0% 0% 0% 100% |
| 85 | PHP #3 | 12 min | 12 min | 2,516 | 1082 | 0% 0% 0% 100% |
| 121 | Python 3 | 18 min | 18 min | 4,700 | 1181 | 0% 0% 0% 100% |
| 125 | Perl #2 | 18 min | 18 min | 1,992 | 1401 | 0% 0% 0% 100% |
| 177 | Ruby 2.0 #2 | 26 min | 26 min | 4,884 | 1137 | 0% 0% 0% 100% |
| 7,964 | C CINT | 20h 06 min | 20h 06 min | 5,288 | 1173 | 0% 0% 0% 100% |
| C# Mono #5 | Failed | 1485 | ||||
| C# Mono #4 | Failed | 1461 | ||||
| "wrong" (different) algorithm / less comparable programs | ||||||
| 1.2 | C++ g++ #2 | 10.55 | 10.56 | 868 | 2288 | |
| 3.6 | JavaScript V8 #3 | 33.15 | 33.17 | 5,956 | 1505 | |
ndiff -abserr 1.0e-8 program output N = 1000 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.
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.