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
If a pattern doesn’t contain (?{}) or (??{}) bits, then $str cannot change during a match. So in that case it would be feasible to postpone the memcpy until right after the match (before the regex engine returns) and memcpy only the matched bits. That way, all regexen which don’t run Perl code would automatically avoid unnecessary copying. I think that would be a worthwhile patch.
Makeshifts last the longest.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: An optimization of last resort: eliminate capturing from your regexps
by diotalevi (Canon) on Jul 24, 2006 at 23:06 UTC | |
by Aristotle (Chancellor) on Jul 24, 2006 at 23:31 UTC | |
by diotalevi (Canon) on Jul 25, 2006 at 02:34 UTC |
In Section
Meditations