The compiler can create a jump table for certain types of switch statements which is more efficient than just evaluating each element like a nested set of if statements. This is dependent on the type of switch and the language you are working in, but many C compilers just this sort of thing in their code generation.
So the short is that a switch can be more efficient but it depends on your particular usage.
Ukko
2010-04-22 15:41:31