Emulation, interpreters and parallel execution
Your understanding of the complexity of a switch or case statement is not correct.  In most languages these statements make a decision based on the value of a single integer variable.  If those integers are densely packed together (as they typically are when an interpreter is decoding an instruction opcode) then the compiler turns this into an $O(1)$ lookup table.

The table is simply an array of addresses.  The control variable for the switch statement is used to determine the offset into the array.  Then the code simply jumps to the address given at that offset in the array.

In the case where the integers are not densely packed together then the compiler builds a logarithmic-height tree of branches each of which divides the remaining range in half, like in the children's "number guessing game."  So, for example, if you have a switch statement over 1000 different cases spread over the numbers 0-1000000000, then you'll be able to determine whether any given input is one of the cases, and which case, in less than 10 comparisons.  (Because $\log_2 1000 &lt; 10$.)