How big is the measured performance difference?

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.

 n-body benchmark N=50,000,000

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.0GNU gcc #5 23.5223.524161429  0% 0% 0% 100%
1.0GNU gcc 23.6023.604161173  0% 0% 0% 100%
1.0C++ GNU g++ #4 23.8123.817881428  0% 1% 0% 100%
1.0Fortran Intel 23.9923.994401389  0% 1% 0% 100%
1.0Scala 24.3024.3314,3401420  0% 1% 0% 100%
1.1Java 6 steady state #2 24.7024.7012,1521498  0% 0% 0% 100%
1.1ATS #2 24.8524.854562088  0% 1% 0% 100%
1.1Java 6 -server #2 25.0525.0812,4121424  1% 0% 0% 100%
1.1Ada 2005 GNAT #2 25.6925.681,2681723  0% 0% 0% 100%
1.1Fortran Intel #2 26.3326.334321244  0% 0% 0% 100%
1.2Clean 28.5728.575441587  0% 0% 0% 100%
1.3Ada 2005 GNAT 30.5630.561,2761608  0% 0% 0% 100%
1.5Pascal Free Pascal 35.0435.041921308  0% 0% 0% 100%
1.5Lisp SBCL 35.6935.6917,8281363  0% 0% 0% 100%
1.6C# Mono #2 37.1937.205,0081410  0% 0% 0% 100%
1.9Lua LuaJIT 45.4445.438681197  0% 0% 0% 100%
1.9C# Mono 45.5545.555,0041403  0% 0% 0% 100%
1.9Lua LuaJIT #2 45.7845.788721265  0% 0% 0% 100%
2.1F# Mono 49.5849.587,0161373  0% 0% 0% 100%
2.3Haskell GHC 53.8253.821,7641687  0% 0% 0% 100%
2.4OCaml 56.8956.896841239  0% 0% 0% 100%
7.4Erlang HiPE #3 172.97172.965,0441399  0% 0% 100% 0%
7.6Go 6g 8g 177.79177.786201329  0% 0% 0% 100%
8.5JavaScript V8 200.11200.1020,3121287  0% 0% 0% 100%
12Scheme PLT 280.05280.039,8121558  0% 0% 0% 100%
14Smalltalk VisualWorks 5 min5 min12,8001652  0% 0% 0% 100%
23Lua 8 min8 min9281197  0% 0% 0% 100%
23Lua #2 9 min9 min9281265  0% 0% 0% 100%
26Java 6 -Xint #2 10 min10 min10,4041424  0% 0% 0% 100%
41Mozart/Oz 15 min15 min5,4521440  0% 0% 0% 100%
60Ruby JRuby #2 23 min23 min91,7761137  0% 0% 0% 100%
60Python CPython #4 23 min23 min2,9401105  0% 0% 0% 100%
61PHP #2 23 min23 min3,4241255  0% 0% 0% 100%
66Python 3 #4 25 min25 min3,9961106  0% 0% 0% 100%
81Perl 31 min31 min2,1281140  0% 0% 0% 100%
114PHP 44 min44 min3,4521289  0% 0% 0% 100%
148Ruby 1.9 #2 58 min58 min2,8721137  0% 0% 0% 100%
170Ruby MRI #2 1h 06 min1h 06 min1,6481137  0% 0% 0% 100%
JavaScript TraceMonkey Failed1287
Lisaac Make Error1615

 n-body benchmark : Double-precision N-body simulation

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.

Revised BSD license