Performance of if statement versus switch statement
- by behrk2
Hi Everyone,
I have an if statement with 16 cases (I am checking the state of four boolean variables). Would there be any value in trying to implement this differently, with nested switch statements perhaps?
What is the actual performance gain of a switch statement over an if statement?
Thanks!