my %hash = ( 1 .. 100000 ); timethese( 500000, { 'obfu' => 'my @result; for my $key ( keys %hash ) { $result[ @result ] = "$key:$hash{ $key }"; }', 'push' => 'my @result; for my $key ( keys %hash ) { push @result, "$key:$hash{ $key }"; }', }); #Results: #Benchmark: timing 500000 iterations of obfu, push... # obfu: 5 wallclock secs ( 2.93 usr + 0.01 sys = 2.94 CPU) @ 169836.96/s (n=500000) # push: 3 wallclock secs ( 2.94 usr + 0.00 sys = 2.94 CPU) @ 170357.75/s (n=500000)