switch() vs if/else if
#4

Quote:
Originally Posted by 10MIN
View Post
I think the last one was slower because the compiler has to "expand" the cases, which results to aprox 1500 cases... So you are comparing 3 ifs with 1500cases... Correct me if I am wrong.
exactly, that's the position when if becomes handy.
Reply


Messages In This Thread
switch() vs if/else if - by ElMaestro123 - 13.06.2018, 10:42
Re: switch() vs if/else if - by jlalt - 13.06.2018, 10:56
Re: switch() vs if/else if - by 10MIN - 13.06.2018, 11:17
Re: switch() vs if/else if - by jlalt - 13.06.2018, 11:32
Re: switch() vs if/else if - by Logic_ - 13.06.2018, 11:34
Re: switch() vs if/else if - by ElMaestro123 - 13.06.2018, 16:37

Forum Jump:


Users browsing this thread: 2 Guest(s)