/usr/share/doc/libkavorka-perl/examples/benchmarks-named.pl is in libkavorka-perl 0.036-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | use v5.14;
use warnings;
use Benchmark 'cmpthese';
package Using_FP {
use Function::Parameters ':strict';
method foo ( :$x, :$y ) {
return [ $x, $y ];
}
}
package Using_Kavorka {
use Kavorka;
method foo ( :$x, :$y ) {
return [ $x, $y ];
}
}
cmpthese(-3, {
Using_FP => q{ Using_FP->foo(x => 1, y => $_) for 0..99 },
Using_Kavorka_Hash => q{ Using_Kavorka->foo(x => 1, y => $_) for 0..99 },
Using_Kavorka_Hashref => q{ Using_Kavorka->foo({x => 1, y => $_ }) for 0..99 },
});
__END__
Rate Using_Kavorka_Hashref Using_Kavorka_Hash Using_FP
Using_Kavorka_Hashref 270/s -- -10% -65%
Using_Kavorka_Hash 302/s 12% -- -61%
Using_FP 768/s 184% 155% --
|