Bug#777556: perl: regexp performance regression since 5.18

Niko Tyni ntyni at debian.org
Fri Feb 27 20:12:34 UTC 2015


On Tue, Feb 10, 2015 at 09:48:21PM +0100, Niels Thykier wrote:
> On Mon, 9 Feb 2015 21:59:22 +0200 Niko Tyni <ntyni at debian.org> wrote:
> > Package: perl
> > Version:: 5.20.1-5
> > Severity: serious
> > Tags: upstream
> > Forwarded: https://rt.perl.org/Ticket/Display.html?id=123743
> > 
> > This should possibly be considered a release critical performance
> > regression. Marking as 'serious' for now.
> > 
> >   (wheezy)$ seq -f "%01000.0f: 0c" 1000 | /usr/bin/time perl5.14.2 -ne '/.*:\s*ab/i'
> >   0.02user 0.00system 0:00.02elapsed 96%CPU (0avgtext+0avgdata 3260maxresident)k
> >   0inputs+0outputs (0major+168minor)pagefaults 0swaps
> >   
> >   (sid)$ seq -f "%01000.0f: 0c" 1000 | /usr/bin/time perl5.20.1 -ne '/.*:\s*ab/i'
> >   7.41user 0.00system 0:07.41elapsed 99%CPU (0avgtext+0avgdata 4100maxresident)k
> >   0inputs+0outputs (0major+204minor)pagefaults 0swaps

> David Mitchell pushed a patch[1] for this issue.

> [1]
> http://perl5.git.perl.org/perl.git/commitdiff/0fa70a06a98fc8fa9840d4dbaa31fc2d3b28b99b

Thanks. This needs some backporting; as t/re/speed.t doesn't exist in
maint-5.20, I think we're best off dropping that part. The regexec.c
hunks apply with just a slight comment change:

--    /*  [unless only anchor is MBOL - implying multiline is set] */
+-    /*  [unless only anchor is BOL and multiline is set] */

I've built a test 5.20.1 based package successfully with the attached
version of the patch and verified it fixes the slowdown above.
So I suppose it should go in the next upload.
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: regexp-performance.diff
Type: text/x-diff
Size: 8307 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20150227/b35c8879/attachment.diff>


More information about the Perl-maintainers mailing list