in reply to Re^2: Optimize a pluggable regex matching mechanism (/o practically deprecated)
in thread Optimize a pluggable regex matching mechanism
perl -Mre=debug -e '@x=qw/a b a a c a/; while (($a,$b,@x)=@x) { /$a/;/ +$b/ }' 2>&1|grep Compiling Compiling REx "a" Compiling REx "b" Compiling REx "a" Compiling REx "c"
Each op remembers the last pattern it compiled.
Yeah, that's kind of what I expected (was too lazy for details), but a general cache would be indeed real overkill.
Both ways there is not much use left for /o, IMHO the perlre and perlretut should be updated with at least footnote...
Cheers Rolf
|
|---|