my %comboHashRef = %{$_[2]};
####
my %comboHashRef = %{$_[2]};
...
foreach my $key (keys %comboHashRef){
####
my $comboHashRef = $_[2];
...
foreach my $key (keys %{ $comboHashRef } ){
####
my $comboHashRef = $_[2];
...
while( my( $key, $value ) = each %{ $comboHashRef } ){
####
return %precords;
####
sub yourWay{
my %h = %{ $_[0] };
return %h;
};;
sub myWay{
my $ref = shift;
return $ref
};;
%hash = ( 1 .. 1e6 );;
cmpthese -5,{
a=>q[
my %h = yourWay( \%hash );
],
b=>q[
my $h = myWay( \%hash );
]
};;
s/iter a b
a 1.12 -- -100%
b 1.03e-006 108368213% --