develooper Front page | perl.perl5.porters | Postings from July 2001

Re: regexes: more end-of-string optimizations

Thread Previous
Jeff 'japhy/Marillion' Pinyan
July 29, 2001 07:42
Re: regexes: more end-of-string optimizations
Message ID:
On Jul 29, Ton Hospel said:

>In article <>,
>	Jeff 'japhy/Marillion' Pinyan <> writes:
>> This leads me to my optimization proposal:  unless (??{ ... }) interferes,
>> any regex with a $ or \Z or \z end-of-string anchor should be able to fail
>> immediately upon inspection of the end of the string.
>don't forget that the m modifier also interferes for $

I'm well aware of that.  And that doesn't lend itself to much
optimization, since you have to tunnel through the string first to find
the newlines.  We already know where the end of the string is.

Maybe it'll be ok.

Jeff "japhy" Pinyan
RPI Acacia brother #734
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **

Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About