> But what's the speed concerns here?  This is negligable.

I just double checked and each if statement takes roughly 9.8
microseconds more to execute then an elsif.  That may not seem like a
lot but over a program spanning several files (perhaps as much as a meg
in code when finished) and using thousands of if statements there is a
huge difference in the amount of time taken, esp. if it's a web program
being used by a number of users simultaneously.

I also triple checked with next statements and I got a really bizarre
result, they were actually slower then just using if elsifs by 17
microseconds.  :: shrugs :: I guess it makes sense -- next involves
extra overhead.

(For what it's worth the experiment was very simple: create 3 perl
scripts, one consisting of 1024 if statements, another consisting of
1023 elsif statements and 1 if, and another with the same and a last at
the end of each (els)if block.  I then used $ time ./test.pl for each of
the scripts, and calculated how much power each statement took.  (Note
all statements were false)).

-Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to