wasm-demo/demo/ermis-f/python_m/cur/0204

37 lines
1.6 KiB
Plaintext

From: roy at popmail.med.nyu.edu (Roy Smith)
Date: Mon, 26 Apr 1999 16:01:41 -0400
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> <3724B2D6.B468687A@prescod.net>
Message-ID: <roy-2604991601410001@qwerky.med.nyu.edu>
Content-Length: 1053
X-UID: 204
Paul Prescod <paul at prescod.net> wrote:
> It is a performance issue if you don't know that regexps are supposed to
> be compiled.
I hope this doesn't sound as bad as I fear it might, but part of being a
good programmer (or at least a good computer scientist) is to understand
performance issues like this.
Regular expression theory hasn't changed a whole bunch in the last 20
years; it's the same stuff in C, Perl, and any other language that has RE
functionality (either built-in or through some library). The idea of
factoring constant operations out of loops is the same today is it was 10,
20, 30 years ago.
If you don't know that RE's get compilied (and that the compilation stage
can be expensive), you don't understand the tool you're using. If you
don't understand that factoring the expensive constant compilation process
out of a loop is important to make your program run fast, you aren't a
good programmer. No programming language can help that.
--
Roy Smith <roy at popmail.med.nyu.edu>
New York University School of Medicine