New-style classes slower than old-style classes? (Was: n-body problem at shootout.alioth.debian.org)

Richard Jones richardjones at optushome.com.au
Sat Oct 7 22:32:28 EDT 2006


Giovanni Bajo wrote:

> Peter Maas wrote:
> 
>>> Did you try using an old-style class instead of a new-style class?
>>
>> The original program has an old style class, changing it to a new
>> style class increases run time by 25% (version is 2.4.3 btw).
> 
> Ah yes. Years ago when I first saw this test it was still using new-style
> classes.
> 
> 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


    Richard




More information about the Python-list mailing list