in reply to Efficiency of multiple if statements
Dijkstra says "Premature optimization is the root of all evil". I would add the corrolary that "'Unnecessary' is, by definition, premature."
That aside, you can pretty easily figure out what makes most sense as your potential bottleneck. What I see is this:
Where do you think the bottleneck would be? It's sure not gonna be items 2 or 3.
xoxo,
Andy
%_=split/;/,".;;n;u;e;ot;t;her;c; ". # Andy Lester
'Perl ;@; a;a;j;m;er;y;t;p;n;d;s;o;'. # http://petdance.com
"hack";print map delete$_{$_},split//,q< andy@petdance.com >
|
|---|