if and elsif are basically the same speed. Of course, if your control flow changes because with elsif a lot of unnecessary tests are skipped, then it stands to reason the code as a whole will be faster, with elsif.
But please stop this micro-optimizing. You can gain a lot more by choosing a proper algorithm, than by this kind of nitpicking.
In reply to Re: Regarding speed: Is elsif or just if faster?
by bart
in thread Regarding speed: Is elsif or just if faster?
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |