For most applications, the choice between an if-ladder and a switch statement should be driven mostly by legibility and not performance. If performance is at stake, I would look for I/O first, memory access patterns second, and instruction sequencing last.