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

P

Peter Maas

Richard said:
Giovanni Bajo wrote: [...]
Anyway, this is a bug on its own I believe. I don't think new-style
classes are meant to be 25% slower than old-style classes. Can any guru
clarify this?

Please try 2.5 - there's been significant optimisation work put into 2.5

I checked that:

10000 runs of nbody.py, time in sec

| classic | new-style | n/c
-----------+---------+-----------+----------
python 2.4 | 2.33 s | 2.89 s | 1.24
python 2.5 | 2.06 s | 2.61 s | 1.27
2.4/2.5 | 1.13 | 1.11 | -

You are right, 2.5 is better than 2.4. But the runtime penalty
for using new-style classes remains.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,690
Members
48,796
Latest member
Greg L.

Latest Threads

Top