Slow Python - what can be done?

Miki Tebeka miki.tebeka at zoran.com
Thu Mar 18 16:39:23 EST 2004


Hello Jason,

> I'm an experience programmer but new to Python. I'm doing a simple
> implementation of a field morphing techinique due to Beier and Neely
> (1992) and I have the simple case working in Python 2.3 - but it's
> REALLY slow.
Did you use hotshot to find *where* you spend the time?

> class Point:
 > ...
I've found out the Python's faster with native types.
One thing is to use a tuple for the point and have functions like 
point_sub(p1, p2)

You can try and use Psyco, in several cases it gives a very big speedup.

HTH.
Miki



More information about the Python-list mailing list