Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^2: Performance of possessive quantifiersby demerphq (Chancellor) |
on Jan 28, 2008 at 14:09 UTC ( [id://664686]=note: print w/replies, xml ) | Need Help?? |
try
on 5.11 And it looks like something broke the superlinear cache. Even with atomic matching this pattern/string combination goes quadratic, as nothing anchors the start of the pattern. Without the atomic matching its worse. Im not sure what the deal is with $re++ either. I would have expected that to have similar performance to (?>$re)+, its possible thats actually a bug. Ill have to think about it. Oh, and dont use benchmarks from a debugging perl. Depending on the code path you go through variable amounts of debugging goo, so using a debugging perl, especially a 5.9.x or later version will not give useful results even comparing features.
--- $world=~s/war/peace/g
In Section
Seekers of Perl Wisdom
|
|