Hash-BulkKeyCopy
view release on metacpan or search on metacpan
benchmark/hash_bulk_keycopy.pl view on Meta::CPAN
},
'PP' => sub {
my $h1 = {};
my $h2 = {%$val2};
hash_bulk_keycopy($h1,$h2,$arr1,$arr2);
},
}));
__END__
$ perl -Mblib benchmark/hash_bulk_keycopy.pl
Benchmark: timing 1000000 iterations of PP, XS...
PP: 11 wallclock secs (10.54 usr + 0.01 sys = 10.55 CPU) @ 94786.73/s (n=1000000)
XS: 6 wallclock secs ( 5.26 usr + 0.00 sys = 5.26 CPU) @ 190114.07/s (n=1000000)
Rate PP XS
PP 94787/s -- -50%
XS 190114/s 101% --
( run in 1.772 second using v1.01-cache-2.11-cpan-71847e10f99 )