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

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Fri Oct 6 16:54:10 EDT 2006


skip at pobox.com wrote:
> Ah, wait a moment.  One more tweak.  Make the body class a psyco class.
> That improves the runtime to 3.02s.  Diff appended.

Nice. Maybe you can do the same trick with:
from psyco.classes import __metaclass__

If you want you can try that trick with this version of mine:
http://shootout.alioth.debian.org/sandbox/benchmark.php?test=nbody&lang=psyco&id=3

(I can't try it, precompiled Psyco doesn't exists yet for Py2.5). If
it's faster, then I can upload some modified version...

Bye,
bearophile




More information about the Python-list mailing list