@array = 1..100;; @hash{ 0 .. 99 } = @array;; cmpthese -1,{ a=>q[my$t=0; $t+=$_ for @array;], b=>q[my$t=0; $t+=$hash{$_} for keys %hash;] };; Rate b a b 35255/s -- -66% a 103177/s 193% --