n-body problem at shootout.alioth.debian.org

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Sat Oct 7 05:25:12 EDT 2006


Paddy:
> You might also put the outer loop calling function advance so many
> times, into the advance function:

Remember that the autors of the Shootout refuse some changes to the
code (like this one), to allow a fair comparison. The rules are strict.

I have improved the Psyco version:
http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=nbody&lang=all

If I find the time I'll try to speed up the Python version too
following some of the suggestions of this thread. Note that on that
site there are 4 different comparisons.

The interesting question is how the Lua JIT can be that fast, it's
often faster than Psyco:
http://shootout.alioth.debian.org/gp4sandbox/benchmark.php?test=all&lang=luajit&lang2=psyco

http://luajit.luaforge.net/

Bye,
bearophile




More information about the Python-list mailing list