Regular Expressions - Python vs Perl

Paul McGuire ptmcg at austin.rr.com
Thu Apr 21 12:06:43 EDT 2005


I'd be very interested to see if there actually is a benchmark suite
for regexp's.  I imagine that this could be an easy area for quite a
varied set of results, depending on the expression features included in
the actual regexp being tested, and even the nature of the input text.
For example, a simple re that just scans for words in a text stream may
perform very differently from one that searches for delimited text, has
to lookahead for greedy matches, maintains return groups, performs
named substitutions, etc.

Without a pretty thorough benchmark suite, I would be dubious of
performance claims being very much better than anecdotes.

-- Paul




More information about the Python-list mailing list