quote:Original post by jitspoe
yeah, you want to order them according to which is the most common, but I was saying if NONE of them occured very often (maybe needed for error checking or something that will happen once every 100 times you run the program -- hypothetical)...
I guess the only difference the "else" makes is a branch at the end -- a tiny bit of mem taken up -- but doesn't affect the number of instructions if all of the conditions are false. It was just on my mind, heh -- thought I'd throw it out there. I don't even remember what I was doing.
If none of them occur very often then what is the point in optimizing it? Your users are hardly going to notice a nanosecond's difference in speed in your error handling code.
[edited by - Sandman on May 31, 2002 7:34:50 AM]