[Melbourne-pm] An old one but an important one

Tim Connors tconnors at astro.swin.edu.au
Sun Jan 20 16:54:29 PST 2008

On Sat, 19 Jan 2008, Scott Penrose wrote:

> And for those who don't know.
> $& $' or $` anywhere in the code found by the compiler makes all  
> regular expressions slow, not just the ones where it is used.
> (sorry about the separate emails)

Crap.  I was always under the impression that $& $' and $` were esoteric 
things that are only used by perlre gurus.

But perlre(1) tells me that parentheses and $1, $2,... use them internally 
with the huge performance hit, but (at least) don't come with the cost of 
slowing down all uses of REs.

I wonder how much of my own code uses parentheses avoidably?

Tim Connors

More information about the Melbourne-pm mailing list