From: paul at prescod.net (Paul Prescod)
Date: Mon, 26 Apr 1999 18:39:18 GMT
Subject: Python too slow for real world
References: <372068E6.16A4A90@icrf.icnet.uk>
				<3720A21B.9C62DDB9@icrf.icnet.uk>
				<3720C4DB.7FCF2AE@appliedbiometrics.com>
				<3720C6EE.33CA6494@appliedbiometrics.com>
				<y0jaevznhha.fsf@vier.idi.ntnu.no>
				<glmvhemn4zx.fsf@caffeine.mitre.org>
				<37215EFB.433AFCA6@prescod.net> <roy-2404991257450001@mc-as01-p63.med.nyu.edu>
Message-ID: <3724B2D6.B468687A@prescod.net>
Content-Length: 1190
X-UID: 1692                                                  

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




