Performance penalty for using classes?
Paul Rubin
phr-n2002b at NOSPAMnightsong.com
Sun Jan 12 03:22:18 EST 2003
tebeka at cs.bgu.ac.il (Miki Tebeka) writes:
> I need my M.Sc. to run fast but I don't want to recode it in C.
> I've noticed that using classes can cause my code to run about 30%
> slower. (See the below tests)
>
> Since I don't need OO much in this project is it worth moving to a
> non-OO programming style?
Only if the 30% speedup really matters to you. It might not. Or maybe
you could just upgrade your PC processor to one 30% faster than the
old one. That sounds like a lot less work than rewriting your software.
More information about the Python-list
mailing list