[Python-Dev] RE: [String-SIG] Re: regexp performance

Fredrik Lundh fredrik@pythonware.com
Thu, 11 Nov 1999 09:06:04 +0100


Tim Peters <tim_one@email.msn.com> wrote:
> > The problem is that PCRE never builds a parse tree, and
> > parse trees are easy to analyse recursively.  Instead, PCRE's
> > functions actually look at the compiled byte codes (for example, look
> > at find_firstchar or is_anchored in pypcre.c), but this makes analysis
> > functions hard to write, and rearranging the code near-impossible.
> 
> This is wonderfully & ironically Pythonic.  That is, the Python compiler
> itself goes straight to byte code, and the optimization that's done works at
> the latter low level.

yeah, but by some reason, people (including GvR) expect a
regular expression machinery to be more optimized than the
language interpreter ;-)

</F>