Regex speed

Peter Hansen peter at engcorp.com
Sat Oct 30 15:07:44 CEST 2004


Reinhold Birkenfeld wrote:
> OK, thank you. I now got rid of all the regexes, and - surprise,
> surprise - the speeds are almost equal. The bitter thing about it is
> that there are now twelve LOC more in Python that don't make
> understanding the code easier.
> 
> So the Perl regex engine seems to be highly optimized, at least for
> simple expressions.

Perhaps it's not just your regexes... as Andrew said, "You should post
the actual code ..."  (Preferably both the Perl and the Python, if you
are trying to make this into a them vs. us kind of thing, as you
seem to be doing.)

-Peter



More information about the Python-list mailing list