Python too slow for real world

Paul Prescod paul at prescod.net
Mon Apr 26 14:39:18 EDT 1999


Roy Smith wrote:
> 
> It is extremely rare that regex compilation time is a major issue.  

I didn't mean to imply it was. Justin asked about the benefits
of "first class regexps" so I pointed out one.

> If
> you're using a regex inside your inner loop and the amount of data you
> feed through it is large enough to matter, you should be compiling it
> yourself outside the loop.  It's still done at run-time, but it's only
> done once so it's almost certainly a trivial amount of time devoted to
> that.

It is a performance issue if you don't know that regexps are supposed to
be compiled. Plus it is a code complexity issue. Having the language
handle it for you automatically is in keeping with other aspects of
Python's design. Heck, I don't even have to compile Python *programs*.

-- 
 Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself
 http://itrc.uwaterloo.ca/~papresco

Company spokeswoman Lana Simon stressed that Interactive 
Yoda is not a Furby. Well, not exactly. 

"This is an interactive toy that utilizes Furby technology," 
Simon said. "It will react to its surroundings and will talk." 
  - http://www.wired.com/news/news/culture/story/19222.html




More information about the Python-list mailing list