use warnings; use strict; use Benchmark qw/cmpthese/; cmpthese(-2, { push => sub { my @x = (123) x 1000; push @x, (456) x 1000; }, append => sub { my @x = (123) x 1000; @x = (@x, (456) x 1000); }, }); __END__ Rate append push append 23682/s -- -31% push 34524/s 46% --