As far as efficiency is concerned there would hardly be any difference, if at all. If the cases in a switch are sparsely distributed the compiler may internally use the equivalent of an if-else chain instead of a compact jump table. However, one should use switch where one can. It is definitely a cleaner way to program and certainly is not any less efficient than the if-else chain.