
perlbug-followup at perl
May 1, 2012, 6:49 PM
Post #1 of 1
(44 views)
Permalink
|
|
[perl #24936] severe regexp performance problem with perl 5.8.*
|
|
On Sat Jan 02 07:12:30 2010, davem wrote: > On Wed, Nov 11, 2009 at 01:56:22PM -0600, Craig A. Berry wrote: > > On Wed, Nov 11, 2009 at 12:00 PM, John Peacock > > <john.peacock [at] havurah-software> wrote: > > > Andrew Dent via RT wrote: > > >> > > >> 5.010000 > > >> � � � �A takes 2.18 msecs. The match was not succesful. > > >> > > >> 5.008008 > > >> � � � �A takes 5.00 msecs. The match was not succesful. > > > > > > You're looking at this backwards. �Perl 5.10.x included lots of > improvements > > > to the regexp internals that has improved things over 5.8.x. �If > you want > > > those improvements, use Perl 5.10.x... > > > > It makes a lot more sense in the context of the RT ticket: > > > > http://rt.perl.org/rt3/Public/Bug/Display.html?id=24936 > > > > where Paul's question came through before Andrew's answer, and it is > > evident that the original bug report was about certain regex matches > > involving .* taking about twice as long under 5.8.0 as under 5.005. > > I quick check running the test script against various old and new > perls > shows the slowdown is still present, with bleed worse than 5.10.x: > > (These are all debugging perls) > > perl5322: > A takes 0.00 msecs. The match was not succesful. > B takes 0.10 msecs. The match was not succesful. > C takes 0.10 msecs. The match was not succesful. > > perl553: > A takes 0.10 msecs. The match was not succesful. > B takes 0.00 msecs. The match was not succesful. > C takes 0.10 msecs. The match was not succesful. > > > perl560: > A takes 5.80 msecs. The match was not succesful. > B takes 7.90 msecs. The match was not succesful. > C takes 7.20 msecs. The match was not succesful. > > perl580: > A takes 9.90 msecs. The match was not succesful. > B takes 11.50 msecs. The match was not succesful. > C takes 10.50 msecs. The match was not succesful. > > perl589: > A takes 10.10 msecs. The match was not succesful. > B takes 10.90 msecs. The match was not succesful. > C takes 9.90 msecs. The match was not succesful. > > perl5101: > A takes 5.50 msecs. The match was not succesful. > B takes 6.10 msecs. The match was not succesful. > C takes 4.50 msecs. The match was not succesful. > > bleadperl: > A takes 12.50 msecs. The match was not succesful. > B takes 13.40 msecs. The match was not succesful. > C takes 12.60 msecs. The match was not succesful. > This doesn't get better: $ /usr/bin/perl 24936.pl 1000 Perl version: 5.010000 A takes 2.45 msecs. The match was not successful. B takes 2.81 msecs. The match was not successful. C takes 2.47 msecs. The match was not successful. D takes 0.00 msecs. The match was successful. E takes 0.01 msecs. The match was not successful. F takes 0.00 msecs. The match was not successful. $ /usr/local/bin/perl5.12.0 24936.pl 1000 Perl version: 5.012000 A takes 5.01 msecs. The match was not successful. B takes 5.16 msecs. The match was not successful. C takes 5.06 msecs. The match was not successful. D takes 0.00 msecs. The match was successful. E takes 0.03 msecs. The match was not successful. F takes 0.04 msecs. The match was not successful. $ perl 24936.pl 1000 Perl version: 5.014000 A takes 5.14 msecs. The match was not successful. B takes 5.48 msecs. The match was not successful. C takes 5.03 msecs. The match was not successful. D takes 0.00 msecs. The match was successful. E takes 4.92 msecs. The match was not successful. F takes 0.06 msecs. The match was not successful. Run on Linux/i386. --- via perlbug: queue: perl5 status: open https://rt.perl.org:443/rt3/Ticket/Display.html?id=24936
|