On Wed, Feb 05, 2003 at 09:53:28AM +0000, Roger Burton West wrote: > On Wed, Feb 05, 2003 at 01:31:21AM -0800, Randy J. Ray wrote: > >$s = $r; > >for (@list) { $s = $s->{$_}; last unless ref $s; } > >There's probably a trickier, shorter "golf" solution, but I was never into > >obfuscated code writing... > > That makes sense; I was looking for a single-step transformation...
Surely the complexity of the operation is what matters, not necessarily the number of steps? A 10000 step function which operates in constant time is always less costly than a 3 step function operating in linear time. Isn't it? Well, for a suitably large set of operations... /joel