/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® quad-core |
Each chart bar shows how many times more Memory, one ↓ n-body program used, compared to the program that used least Memory.
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 | Pascal Free Pascal #2 | 37.21 | 37.23 | 8 | 1322 | 96% 0% 0% 4% |
| 1.0 | Pascal Free Pascal #3 | 47.18 | 47.19 | 8 | 1418 | 0% 100% 0% 0% |
| 1.0 | Pascal Free Pascal | 34.67 | 34.68 | 8 | 1308 | 0% 100% 0% 0% |
| 32 | Fortran Intel #4 | 22.82 | 22.83 | 252 | 1172 | 0% 0% 100% 0% |
| 32 | Fortran Intel #3 | 22.89 | 22.90 | 256 | 1299 | 0% 0% 0% 100% |
| 33 | Fortran Intel | 20.34 | 20.35 | 260 | 1389 | 0% 0% 0% 100% |
| 37 | C++ g++ #4 | 20.79 | 20.80 | 292 | 1428 | 52% 4% 7% 50% |
| 37 | C gcc #5 | 22.98 | 22.99 | 292 | 1429 | 0% 1% 100% 0% |
| 40 | ATS #2 | 20.65 | 20.65 | 320 | 1920 | 0% 0% 0% 100% |
| 42 | C gcc #2 | 22.22 | 22.24 | 336 | 1263 | 0% 0% 100% 0% |
| 42 | C gcc #4 | 8.85 | 8.85 | 336 | 1490 | 0% 0% 100% 1% |
| 42 | C++ g++ | 20.93 | 20.94 | 336 | 1659 | 75% 0% 0% 25% |
| 42 | C gcc #3 | 23.84 | 23.85 | 336 | 1208 | 79% 0% 0% 21% |
| 42 | C gcc | 20.78 | 20.79 | 336 | 1173 | 0% 0% 100% 0% |
| 42 | C gcc #6 | 20.98 | 20.99 | 336 | 1180 | 87% 0% 0% 13% |
| 42 | C++ g++ #6 | 20.60 | 20.61 | 336 | 1668 | 100% 0% 0% 1% |
| 65 | Fortran Intel #2 | 20.05 | 20.06 | 520 | 1496 | 0% 0% 0% 100% |
| 73 | OCaml | 47.67 | 47.68 | 580 | 1239 | 1% 0% 0% 100% |
| 78 | C++ g++ #3 | 10.41 | 10.42 | 620 | 1763 | 1% 1% 0% 100% |
| 109 | C++ g++ #5 | 10.55 | 10.56 | 868 | 1749 | 57% 0% 0% 43% |
| 126 | Go | 35.69 | 35.68 | 1,004 | 1310 | 0% 100% 0% 0% |
| 154 | Ada 2005 GNAT #5 | 15.01 | 15.02 | 1,232 | 2427 | 0% 0% 100% 0% |
| 155 | Ada 2005 GNAT #3 | 23.54 | 23.55 | 1,236 | 1740 | 83% 0% 0% 17% |
| 155 | Ada 2005 GNAT | 26.02 | 26.03 | 1,236 | 1608 | 71% 0% 0% 29% |
| 251 | Haskell GHC | 29.76 | 27.13 | 2,008 | 1695 | 27% 32% 17% 35% |
| 251 | Haskell GHC #2 | 24.77 | 24.02 | 2,008 | 1874 | 11% 58% 35% 1% |
| 285 | Perl #2 | 19 min | 19 min | 2,280 | 1401 | 24% 16% 61% 1% |
| 315 | PHP #3 | 12 min | 12 min | 2,520 | 1082 | 77% 0% 23% 0% |
| 511 | Lisp SBCL #2 | 37.55 | 37.56 | 4,088 | 1398 | 0% 0% 0% 100% |
| 511 | Lisp SBCL | 47.40 | 47.42 | 4,088 | 1363 | 1% 0% 0% 100% |
| 590 | Python 3 | 18 min | 18 min | 4,716 | 1181 | 93% 0% 0% 7% |
| 611 | Ruby 2.0 #2 | 26 min | 26 min | 4,884 | 1137 | 69% 10% 22% 1% |
| 1,054 | Erlang HiPE #3 | 162.90 | 162.95 | 8,428 | 1399 | 13% 87% 0% 0% |
| 1,747 | Java 7 #2 | 24.41 | 24.39 | 13,976 | 1424 | 0% 0% 0% 100% |
| 2,028 | C# Mono #3 | 23.77 | 23.79 | 16,220 | 1305 | 100% 0% 0% 0% |
| 2,028 | C# Mono | 40.21 | 40.22 | 16,224 | 1403 | 0% 100% 1% 0% |
| 2,028 | C# Mono #2 | 24.07 | 24.08 | 16,224 | 1410 | 0% 0% 0% 100% |
| 2,028 | C# Mono #6 | 28.77 | 28.78 | 16,224 | 1289 | 0% 100% 0% 0% |
| 2,040 | C# Mono #4 | 32.58 | 32.59 | 16,320 | 1461 | 0% 100% 0% 1% |
| 2,066 | C# Mono #5 | 32.30 | 32.31 | 16,524 | 1485 | 0% 100% 0% 0% |
| 2,158 | Racket #2 | 55.34 | 55.34 | 17,264 | 1689 | 0% 0% 0% 100% |
| 2,295 | Racket | 120.12 | 120.13 | 18,356 | 1496 | 0% 1% 100% 0% |
| 2,347 | Scala | 23.97 | 23.91 | 18,776 | 1358 | 0% 1% 100% 0% |
| 2,890 | F# Mono | 31.38 | 31.39 | 23,116 | 1259 | 100% 0% 0% 0% |
| 4,855 | Dart #2 | 93.40 | 93.53 | 38,840 | 1297 | 0% 0% 0% 100% |
| 4,872 | Dart | 105.08 | 105.20 | 38,972 | 1689 | 0% 0% 100% 0% |
| 8,387 | Clojure | 46.80 | 36.83 | 67,092 | 2162 | 10% 12% 10% 95% |
| 73,225 | Ruby JRuby #2 | 9 min | 9 min | 585,796 | 1137 | 52% 0% 0% 48% |
| "wrong" (different) algorithm / less comparable programs | ||||||
| 78 | C++ g++ #2 | 10.55 | 10.56 | 620 | 2288 | |
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.