http://www.perlmonks.org?node_id=560459


in reply to Re: An optimization of last resort: eliminate capturing from your regexps
in thread An optimization of last resort: eliminate capturing from your regexps

True. Using @- and @+ does not invoke the $`, $&, $' penalty. The $@ penalty is just the memcpy penaly I mentioned except it is enabled for all regexps, even the non-capturing ones. Any regexps that already use capturing can't be penalized anymore and aren't any slower because of it.

⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

  • Comment on Re^2: An optimization of last resort: eliminate capturing from your regexps