Ha-ha, Just listen to Jim...
Type: Posts; User: DuckCowMooQuack
Ha-ha, Just listen to Jim...
With any modern day computer...Unless you have like thousands of lines of comparison statements...it won't matter too much. What is the actual program you are implementing the switch statement in?
The switch statment in this case is more efficient. Sometimes it's a decision of how elegent you want your code to look, or how elegent you want to solve a problem.