in reply to Re^2: Coding style
in thread Coding style
When I need to speed up code I go looking for nested hash references as in your example. It's my believe the cost of creating a new variable is small(er) compared to the cost of looking up the value of a nested reference. If the same value is referenced more than once, it's worth creating a variable to skip as much dereferencing as you can.
The fact that it's more readable is just a bonus.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Coding style
by nyamned (Sexton) on Jul 13, 2010 at 16:56 UTC |