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  100% 0% 0% 0%
1.0GNU gcc 23.6123.614161173  0% 0% 0% 100%
1.0C++ GNU g++ #4 23.8223.827881428  100% 0% 0% 0%
1.0Fortran Intel 23.9923.994401389  0% 100% 0% 0%
1.0Scala 24.2624.2814,3921420  84% 0% 0% 16%
1.0Java 6 steady state #2 24.6924.6912,1721498  75% 11% 14% 0%
1.1ATS #2 24.8924.894562088  0% 100% 0% 0%
1.1Java 6 -server #2 25.0325.0312,4081424  100% 0% 0% 0%
1.1Ada 2005 GNAT #2 25.6925.691,2641723  0% 0% 100% 0%
1.1Fortran Intel #2 26.3326.334321244  0% 100% 0% 0%
1.2Clean 28.6128.605441587  0% 100% 0% 0%
1.3Ada 2005 GNAT 30.5830.581,2761608  0% 0% 0% 100%
1.5Pascal Free Pascal 35.0435.041921308  0% 0% 0% 100%
1.5Lisp SBCL 35.6835.6917,8281363  0% 0% 99% 0%
1.6C# Mono #2 37.2037.205,0081410  0% 0% 0% 100%
1.9Lua LuaJIT 45.4345.438681197  0% 100% 0% 0%
1.9C# Mono 45.5545.555,0361403  0% 0% 100% 0%
1.9Lua LuaJIT #2 45.7845.788681265  0% 100% 0% 0%
2.1F# Mono 49.8349.857,0041373  97% 8% 3% 0%
2.3Haskell GHC 53.7953.791,7641687  100% 0% 0% 0%
2.6OCaml 60.1460.146801239  0% 100% 0% 0%
7.6Go 6g 8g 177.61177.616201329  0% 100% 0% 0%
8.2Erlang HiPE #3 192.12192.135,7281399  100% 0% 0% 0%
8.5JavaScript V8 199.74199.7220,3081287  0% 0% 0% 100%
11Scheme PLT 269.67269.699,8441558  0% 100% 0% 0%
14Smalltalk VisualWorks 5 min5 min12,7961652  0% 100% 0% 1%
23Lua 8 min8 min9281197  1% 0% 0% 99%
23Lua #2 9 min9 min9281265  0% 100% 0% 0%
25Java 6 -Xint #2 9 min9 min10,4041424  0% 75% 0% 25%
41Mozart/Oz 15 min15 min5,3761440  100% 0% 0% 0%
53PHP #2 20 min20 min3,4121255  0% 0% 100% 0%
60Ruby JRuby #2 23 min23 min96,6321137  1% 1% 99% 1%
64Python CPython #4 25 min25 min2,9401105  100% 0% 0% 0%
65Python 3 #4 25 min25 min4,0001106  0% 0% 100% 0%
81Perl 31 min31 min2,1281140  0% 0% 0% 100%
112PHP 43 min43 min3,4401289  0% 0% 0% 100%
147Ruby 1.9 #2 57 min57 min2,8721137  1% 0% 0% 99%
169Ruby MRI #2 1h 06 min1h 06 min1,6521137  0% 100% 0% 0%
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