develooper Front page | perl.perl5.porters | Postings from March 2011

[perl #76546] regex engine slowdown bug

Alex Efros via RT
March 31, 2011 01:09
[perl #76546] regex engine slowdown bug
Message ID:
Срд. Мар. 30 06:22:23 2011, powerman писал:
> I've just hit similar issue again. This time I managed to prepare 
> example. I'm not 100% sure this is same bug, but it looks similar:

Sorry, one of examples was wrong. Here are correct examples:

$ time perl -e '$s="<a>"x10000;
  1 while $s =~ /<X[^>]*(?-i:>)(.*?)(?=<a)/gis'

real    0m0.842s
user    0m0.836s
sys     0m0.002s

$ time perl -e '$s="<a>"x10000;
  1 while $s =~ /<X[^>]*(?i-:>)(.*?)(?=<a)/gis'

real    0m0.003s
user    0m0.003s
sys     0m0.000s

> This happens both on 5.8.8 and 5.12.2 Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About