New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
severe regexp performance problem compared to 5.6 #7042
Comments
From kai+perl@conti.nuCreated by kai+perl@conti.nuA severe regexp performance problem seems to exist in perl 5.8.* While upgrading from perl 5.005p3 to 5.8.2, some existing applications Upon closer examination, it was determined that certain regexp's using Example: $line = 'Jan 16 15:56:37 sonet sendmail[9368]: i0CGl7a1015852: to=<abuse@tiscali.be>,<abuse@tiscalinet.be>, ctladdr=<spamshield@conti.nu> (100/101), delay=4+04:09:29, xdelay=00:00:00, mailer=esmtp, pri=17436067, relay=mailer.tiscali.be., dsn=4.0.0,stat=Deferred: mailer.tiscali.be.: Network is unreachable'; regexps executed performing at a ridiculously slow pace: compare to: While leading .* is redundant at most, the bahaviour gets outright bizarre Also noteworthy: Why is D) performing so much better than E) and F) ? We can safely assume that LOTS of less than perfectly designed regexps Thanks for your consideration, Kai Schlichting Perl Info
|
From @AbigailOn Sun, Jan 18, 2004 at 01:11:12AM -0000, kai+perl@conti.nu (via RT) wrote:
Because D is a match. For D, the regex engine will try to match 'able|e' Here's a program that shows there's a huge slowdown between 5.005_03 #!/usr/bin/perl -w use strict; my @versions = qw /5.005 5.005_01 5.005_02 5.005_03 my $prog = <<'--'; use Benchmark qw /timeit timestr/; my $count = shift || 100; $line = 'Jan 16 15:56:37 sonet sendmail[9368]: i0CGl7a1015852: ' . my @regexes = ( foreach my $entry (@regexes) { -- foreach my $version (@versions) { __END__ |
The RT System itself - Status changed from 'new' to 'open' |
From @andk
> Here's a program that shows there's a huge slowdown between 5.005_03 The tiny patch with the huge impact was 4759. On my system your installed-perls/perl/pu96yqS/perl-5.005_63@4759/bin/perl For a reference, bleadperl takes installed-perls/perl/p7Z5q87/perl-5.8.0@22306/bin/perl -- |
From sgc294@internode.on.netThis needs to be tested to see if it still exists under 5.10 Cheers Paul Fenwick via Andrew Dent |
From [Unknown Contact. See original ticket]This needs to be tested to see if it still exists under 5.10 Cheers Paul Fenwick via Andrew Dent |
From sgc294@internode.on.netTesting under modern versions of Perl (Strawberry Perl) C:\test>perl regextest.pl C:\test>perl regextest.pl Cheers Andrew Dent |
From @JohnPeacockAndrew Dent via RT wrote:
You're looking at this backwards. Perl 5.10.x included lots of John |
From @craigberryOn Wed, Nov 11, 2009 at 12:00 PM, John Peacock
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 |
From @iabynOn Wed, Nov 11, 2009 at 01:56:22PM -0600, Craig A. Berry wrote:
I quick check running the test script against various old and new perls (These are all debugging perls) perl5322: perl553: perl560: perl580: perl589: perl5101: bleadperl: -- |
From @jkeenanOn Sat Jan 02 07:12:30 2010, davem wrote:
This doesn't get better: $ /usr/bin/perl 24936.pl 1000 $ /usr/local/bin/perl5.12.0 24936.pl 1000 $ perl 24936.pl 1000 Run on Linux/i386. |
@iabyn - Status changed from 'open' to 'resolved' |
From @iabynOn Sun, Feb 15, 2004 at 05:00:32AM +0100, Andreas J Koenig wrote:
This performance issue appears to have been fixed in 5.22.0; perl561o: -- |
Migrated from rt.perl.org#24936 (status was 'resolved')
Searchable as RT24936$
The text was updated successfully, but these errors were encountered: