Python is slow

Tim Chase python.list at tim.thechases.com
Wed Dec 10 14:33:19 EST 2008


[nibbling a little flame-bait]

> Python is even slower than PHP!
> 
> Just go to any Python website and you will know.
> An example is:
> http://www2.ljworld.com/

I'm not sure I'm seeing what you're seeing -- the dynamic page 
loaded in under 2 seconds -- about on par with sun.com, 
python.org, php.net or msn.com all being pulled from non-cached 
servers.  You sure you're not mistaking your bandwidth and/or 
browser-rendering slowness for Python-as-a-web-server slowness?


Would it be nice if Python was faster?  Sure, why not?

Does it meet my needs speed-wise?  99% of the time, yes.  With 
Psyco, 99.9% of the time.  As has been shown repeatedly over the 
last couple months, algorithm-choice makes a far greater impact 
than some python tweaks.  Most of my time spent waiting is 
usually on I/O (disk, network, or user).  And those times I've 
experienced slowness where I'm not waiting on I/O, it's always 
been an algorithm aspect (an O(N**2) fuzzy comparison algorithm 
is my prime offender).  A faster Python might shave a 30-60 
seconds off a 10 minute run, but it's still a walk around the 
office either way.

> Python is slow. Very slow.

However until you have a use-case that *you* have implemented 
with *real code*, publicly vetted the algorithm, and THEN find it 
slow as demonstrated by profiled timings, I'm afraid it's all 
just unsubstantiated hot air to say categorically that "python is 
slow".  It might be "too slow to do some particular CPU-intensive 
task", but it's repeatedly proven quite sufficient for a wide 
variety of development needs.

-tkc







More information about the Python-list mailing list