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

[perl #76546] regex engine slowdown bug

From:
Alex Efros via RT
Date:
March 31, 2011 01:09
Subject:
[perl #76546] regex engine slowdown bug
Message ID:
rt-3.6.HEAD-23755-1301491554-730.76546-15-0@perl.org
Срд. Мар. 30 06:22:23 2011, powerman писал:
> I've just hit similar issue again. This time I managed to prepare 
small 
> 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





nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About