in reply to passing refs to subs
is faster than:$foo{'bob'};
So if you have a small array/hash, and dereference it alot, code it both ways, and see what Benchmark tells you. I'm betting the difference will be small enough, you should be optimizing for readability instead.$bar->{'bob'}; # Slower, extra dereference
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(Ovid) RE(2): passing refs to subs
by Ovid (Cardinal) on Oct 10, 2000 at 01:47 UTC |