This bug is not relevant in current stable release of debian.
Maybe something wash changed upstream.
Upstream but still open:
https://rt.perl.org/Public/Bug/Display.html?id=129802
Current test:
root@gamma:~# cat /etc/issue
Debian GNU/Linux 10 \n \l
root@gamma:~# perl --version
This is perl 5, version 28, subversion 1 (v5.28.1) built for
i686-linux-gnu-thread-multi-64int
(with 61 registered patches, see perl -V for more detail)
Copyright 1987-2018, Larry Wall
Perl may be copied only under the terms of either the Artistic License
or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
root@gamma:~# cat pb
#!/usr/bin/perl
# https://rt.perl.org/Public/Bug/Display.html?id=129802
use strict;
use warnings;
use Benchmark 'cmpthese';
my $s = "A"x (2**16 + 5);
my $cat = 'B' . $s . 'B';
my $spr = sprintf "B%sB", $s;
my $ca2 = "$cat "; chop $ca2;
cmpthese(-1, {
"assign" => sub {my $i=0; $s =~ /./ while $i++ < 100 },
"concat" => sub {my $i=0; $cat =~ /./ while $i++ < 100 },
"sprintf" => sub {my $i=0; $spr =~ /./ while $i++ < 100 },
"okeycat" => sub {my $i=0; $ca2 =~ /./ while $i++ < 100 },
});
root@gamma:~# ./pb
Rate concat assign sprintf okeycat
concat 30075/s -- -2% -2% -4%
assign 30632/s 2% -- 0% -2%
sprintf 30632/s 2% 0% -- -2%
okeycat 31210/s 4% 2% 2% --
root@gamma:~#