Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

IF vs Switch

Name: Anonymous 2010-07-07 12:12

if (1==a){}else{} vs switch(a){case 1:}
Which one is faster? At which point of complexity switches are faster than ifs?

Name: Anonymous 2010-07-07 14:32

>>10
Well, that's certainly true for simple questions, but there's a lot of questions that don't have a clear solution and call for a discussion and exploration by experienced users. Not to mention that questions aren't everything that this board could be used for, just discussing and sharing would be cool.

But no, I really don't think /prog/ has a significant number of seasoned programmers. I myself asked a broader question, about how should I structure my code, but no one was willing to seriously participate.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List