in reply to Which code executes faster
The statement modifier form,
should be a bit faster, since no lexical scope is created. Faster yet could be,return 1 if $n < 1;
if that's what you want to happen when the test fails.return $n < 1;
In most non-trivial code it's not going to make any noticeable difference.
After Compline,
Zaxo
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Which code executes faster
by reasonablekeith (Deacon) on Jul 31, 2006 at 08:03 UTC | |
Re^2: Which code executes faster
by alandev (Scribe) on Jul 31, 2006 at 05:04 UTC |