How slow? (was Re: Python IS slow !)
Gordon McMillan
gmcm at hypernet.com
Sun May 2 10:21:46 EDT 1999
David Steuber wrote:
> Exactly how slow are we talking about here?
Depends completely on who you're talking to.
> I want to use Python for an interactive program. Speed is nice, but
> it only has to be fast enough to not frustrate the user. I also
> expect to use it for prototyping. The plan is to use the Python
> interpreter in the application for an extension and control
> language. Again, speed is nice, but it may not be critical.
Most of the specific complaints about Python's slowness come from
people doing regular expression searches of large text files and
comparing the speed with Perl. No question, Perl wins.
Another set of complaints is accompanied by code, and the observation
that "this seems slow, how can I speed it up". Usually, an
experienced Pythoner can significantly speed it up (albeit
sometimes at the expense of clarity).
This thread is a bit unusual in being a general complaint, based on
measuring Python's function call overhead. Again, there's some truth
there, but it doesn't appear to be based on a user's perception of
slowness of an app.
Put another way - I use Python extensively. Every once in a while I
find I need to profile and optimize some subsection (usually just the
inner layers of nested loops).
- Gordon
More information about the Python-list
mailing list