n-body benchmark

Read ↓ the benchmark rules. Double-precision N-body simulation N=20,000,000 (Check that Error or Timeout happened at other values of N with n-body full data).

    sort sort sort sort
  x   Program & Logs CPU secs Memory KB Size B Elapsed secs ~ CPU Load
1.0Oberon-2 OO2C 14.601,6961449  
1.0C++ GNU g++ #2 14.629321689  
1.0Java 6 -server #2 14.7511,5241408  
1.0Eiffel SmartEiffel 14.815201449  
1.0GNU gcc 14.843961157  
1.0Java 6 -Xms64m #2 14.8411,6521408  
1.1C++ GNU g++ #3 15.498041328  
1.1Java 1.4 -server 15.7510,2961388  
1.1C++ GNU g++ 15.848481333  
1.1Java 6 -server 15.9312,0121414  
1.1Java 6 -Xms64m 16.0912,1161414  
1.1Java GNU gcj 16.1415,5881388  
1.1Fortran Intel #2 16.364401228  
1.1Scala 16.4320,7961404  
1.1Intel 16.604441157  
1.1Fortran Intel 16.684401373  
1.2Pascal Free Pascal 16.912721298  
1.2Nice #2 17.0712,0641297  
1.2C++ Intel #3 17.162361328  
1.2Clean 17.285201706  
1.2GNU gcc #3 17.453961299  
1.2Intel #3 17.744401299  
1.2Lisaac 17.774801603  
1.3Java 6 -client #2 18.7910,0881408  
1.4Java 6 -client 20.3910,2801414  
1.4Fortran G95 20.405401373  
1.4Digital Mars 20.676881292  
1.4CAL 20.9314,3642340  
1.5SML SML/NJ 21.512,6241298  
1.5Lisp SBCL 22.5316,9521347  
1.6C++ Intel 23.934201333  
1.8Digital Mars #2 25.916801177  
1.8Ada 2005 GNAT 26.384801592  
1.9SML MLton #2 27.277401311  
1.9Nice 28.3312,6401288  
2.0C# Mono 29.395,0601387  
2.3BASIC FreeBASIC #4 33.847721414  
2.4Zonnon Mono 34.615,1681508  
3.3Haskell GHC 48.721,6481671  
3.5Forth bigForth 51.007201373  
3.7OCaml 54.006441223  
7.2F# Mono 105.177,6361348  
8.7Lua LuaJIT #2 127.439561249  
9.6C++ Intel #2 140.494441689  
10Erlang HiPE #3 147.594,7361383  
11Fortran G95 #2 161.995441228  
15Scheme Ikarus 225.3228,0161582  
21Scheme Chicken 313.401,9881378  
23Scheme Chicken #3 331.992,3001321  
27Mercury 391.555,0281765  
27Forth GNU GForth 400.058881311  
27Java 6 -Xint #2 400.619,5561408  
33Scheme PLT #2 477.528,0361407  
33Smalltalk VisualWorks 481.4412,7201636  
33Java 6 -Xint 482.929,6921414  
34Python Psyco #4 498.083,6441169  
36Scheme PLT 518.567,0961528  
40Lua #2 586.858721249  
44Python Psyco #2 635.973,2561028  
86Mozart/Oz 1,249.094,3441453  
96Pike 1,396.013,4161244  
99Prolog YAP #2 1,442.0922,8001439  
105Groovy 1,528.6555,0201198  
116Perl 1,697.591,9361134  
121Ruby JRuby #2 1,771.7541,9641142  
135JavaScript Rhino 1,968.3413,6361271  
138Python #2 2,015.782,4401011  
140Icon 2,042.741,2281271  
145Python IronPython 2,111.7016,7041056  
148Python 2,163.242,4401056  
163PHP 2,381.865,6361273  
166Smalltalk GNU 2,417.384,2881641  
169Python IronPython #2 2,464.9716,7921011  
186Ruby Core 1.9.0 #2 2,717.752,4681142  
236JavaScript SpiderMonkey 3,447.9966,4521271  
319Prolog SWI #2 4,662.822,4881557  
320Tcl #2 4,667.071,9601438  
332Ruby #2 4,847.571,7121142  
595Prolog SWI 8,683.692,5241570  
916Rebol 13,368.842,7801148  
CINT Timed Out1157
Io Failed1090
Scala #2 Failed1414
interesting alternative programs
0.9GNU gcc #2 13.8639611700.00
1.1Intel #2 15.9044411700.00
1.6C# Mono #2 23.205,07213940.00
13Smalltalk Squeak 193.6420,08416360.00
missing programs
Smalltalk Squeak No program

 the n-body benchmark rules

ndiff 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