Bug#839600: perl: concatenating string instead of sprintf takes all computation power of server
Niko Tyni
ntyni at debian.org
Mon Oct 3 19:23:51 UTC 2016
On Sun, Oct 02, 2016 at 11:59:12PM +0300, Niko Tyni wrote:
> It seems to have to do with the size of the input file rather
> than its contents, but I'm not quite sure yet.
It looks like none of the gory regexps are necessary to trigger it.
Here's a short test case, resulting here in
Rate concat assign sprintf
concat 2928/s -- -94% -94%
assign 47733/s 1530% -- -0%
sprintf 47733/s 1530% 0% --
so showing the 'concat' option has pathologic performance.
It goes away if the length of the base string $s is varied
even slightly, and seems to reappear in 8-byte increments
or decrements. Some of those, like 2**16 - 3, also blow
up the 'sprintf' performance.
The results don't vary much between jessie (Perl 5.20) and sid (5.24)
for me on amd64.
I'll test/bisect this on upstream code next and try to find out if it's
really copy-on-write related or something else.
--
Niko Tyni ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 839600.pl
Type: text/x-perl
Size: 364 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/perl-maintainers/attachments/20161003/d32d79a9/attachment.pl>
More information about the Perl-maintainers
mailing list