3 ms·
The tables are the standard format from the benchmarking module used. I agree they are annoying to grasp at first, a better format should be found. But what's
by simcop2387 12y ago
The tables are the standard format from the benchmarking module used. I agree they are annoying to grasp at first, a better format should be found.
But what's going on is that in the second one it's showing that Method-Signature is taking 23% longer than native signature, and 37% longer than native assignment. The second row shows native-signature taking 30% less time (this is the other direction from method-signature vs native-signature, so the values are inverses of eachother), and being 18% slower than native assignment.
I'm not sure why it it's significantly different performance wise, but i'd expect that to be fixable in the future. Part of it is the explicit check it adds normally for the number of parameters.
It's possible that it's implemented by doing shifts so it performs more like
sub f {
my $a = shift;
my $b = shift;
my $c = shift;
That would help the slurpy parameter to be easy to implement internally but would mean that there's possibly some extra copies that don't need to happen because it creates a new @_ each time when it pulls the first value off.