Hi Max,
that depends of compiler. Optimizing compilers have options that allow to optimize for memory usage, optimize for speed, compromise, etc. Someones allow to specify more precisely how to treat different situations.
A switch can be compiled in different ways by the same compiler depending of the cases. For example, if the cases of a switch are "random" numbers, the resulting code can be the same as if you used if-elseif statements. But if the cases are correlative numbers, the resulting code can use a look-up table adresses for jumping, what is better both in speed and memory usage.
A typical situation I use is a finite-state machine constructed with a switch. I define the states with enum; this assures that they are correlative numbers starting from zero, and the compiler (if it is smart) can take profit of this.
In many cases it is useful to examine the assembly code generated by the compiler, and evetually optimize it "at hand" in one of the ways mentioned by stainwood (if your code don't need to be portable to other processors) once you have debugged tour program (tested that your algorithm is correct).
I have not at hand any document to send you (sorry); at less i hope this helps.
regards
Z