If you throw away warnings you can double speed withinstead ofif (defined(my $foo = exists $lookup{$bar})) { .... }if (exists $lookup{$bar}) { my $foo = $lookup{$bar}; ... }
Maybe you can, but it hardly matters as they do two entirely different things. The first sets $foo to either 1 or "" (either of which is always defined.)
-sauoq "My two cents aren't worth a dime.";
In reply to Re: Re: Structure is more important than speed
by sauoq
in thread Which way is faster?
by dws
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |