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

Peter Maas peter.maas at somewhere.com
Sat Oct 7 12:59:58 CEST 2006

bearophileHUGS at lycos.com wrote:
>> 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'm only aware of the rule that the language has to be used "as-is", e.g.
you must not encapsulate time-critical parts in a C extension and announce
the result as "fast Python".

To put the outer loop inside a function is a degree of freedom which is
available in every language so should be allowed in a shoot-out. The global
arrays in the Perl program are on the same track.


Peter Maas, Aachen
E-mail 'cGV0ZXIubWFhc0B1dGlsb2cuZGU=\n'.decode('base64')

More information about the Python-list mailing list