in reply to Re^5: Very basic question on performance
in thread Very basic question on performance
to still be very fine (perhaps slightly slower, but very clear), but the way the original script was coded with numerous intermediate variables (to store the squares, etc.) actually made the things more complicated to follow than a single and simple math expression which all of us presumably can understand at first glance.sub diag { my ($x, $y) = @_; sqrt( $x^^2 + $y^^2 ); }
|
|---|