in reply to Re^5: Optimize a perl block
in thread Optimize a perl block

i have tried that and $cache{$inner} += $_->{value} for @{ $foo->{$inner} }{@keys}; is slightly slower than $cache{$inner} += $foo->{$inner}{$_}{value} for @keys; but both are slower (just about 1s) than map, so i will stay with your first version !

now my code run in 12s instead of 30s with my version, i would not have hoped for such optimization, Perl and YOU are magic ! ;)