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 20.3720.375161173  100% 0% 0% 0%
1.0C++ GNU g++ #4 20.5720.569321428  0% 0% 0% 100%
1.0GNU gcc #5 20.7420.745121429  100% 0% 0% 0%
1.0Fortran Intel 21.2421.245001389  0% 0% 100% 0%
1.0Fortran Intel #2 21.3721.374961244  0% 0% 100% 0%
1.1ATS #2 21.8321.835282088  0% 0% 100% 0%
1.1Scala 23.0423.0317,9201420  0% 0% 100% 0%
1.1Java 6 steady state #2 23.1123.1114,9521498  81% 0% 0% 19%
1.1Java 6 -server #2 23.1323.1315,1001424  0% 0% 0% 100%
1.1Lisp SBCL 23.1323.1419,5441363  100% 0% 1% 0%
1.2Ada 2005 GNAT #2 24.1124.101,5401723  0% 0% 0% 100%
1.3Ada 2005 GNAT 27.4027.401,5401608  100% 0% 0% 0%
1.5Haskell GHC 31.4531.462,0481687  0% 0% 0% 100%
1.6OCaml 32.6932.708161239  100% 0% 0% 0%
1.6Go 6g 8g 32.7332.747681329  0% 0% 100% 0%
1.6Clean 33.0833.085721587  0% 0% 0% 100%
1.8Pascal Free Pascal 36.3336.342041308  0% 0% 100% 0%
1.8C# Mono #2 37.3837.385,7241410  0% 0% 100% 0%
2.2F# Mono 45.2545.258,0721373  0% 0% 12% 88%
2.3C# Mono 46.8446.845,7361403  6% 0% 100% 0%
6.8Erlang HiPE #3 137.81137.818,7641399  100% 0% 0% 0%
9.1Scheme PLT 185.34185.3413,5321558  0% 0% 100% 0%
10JavaScript V8 213.16213.1521,5081287  0% 0% 0% 100%
12Java 6 -Xint #2 237.96238.1012,4161424  0% 100% 0% 0%
25Lua #2 8 min8 min1,0961265  0% 0% 0% 100%
25Lua 8 min8 min1,1121197  62% 37% 0% 0%
51PHP #2 17 min17 min4,2841255  0% 0% 0% 100%
59Python CPython #4 19 min19 min3,8321105  100% 0% 0% 0%
68Ruby JRuby #2 23 min23 min228,3721137  1% 47% 52% 0%
82Perl 27 min27 min2,5681140  0% 0% 100% 0%
107PHP 36 min36 min4,3241289  1% 2% 100% 1%
199Ruby MRI #2 1h 07 min1h 07 min2,1681137  0% 0% 100% 0%
JavaScript TraceMonkey Failed1287
Smalltalk VisualWorks Failed1652

 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