In my long experience, nested IF statements are not slow at all. The key trick that experienced programmers do, is sort the IF statements in the order of their probability of occurring. If you have 4 IF clauses and one else clause, and clause A has probability 0.1, B has 0.001, C has 0.0004 and D has 0.65, then you put them in the order D, A, B, C, so that the computer has less work to do. Another optimization that is frequently done is that if a whole bunch of the clauses are inside some range, like negative values, you put in an IF statement first to quickly exclude a whole set of conditions.
The only time i see slow IF statements, is when the IF clauses are repeatedly calling some function, like IF longfunc(A) == 3 ELSE IF longfunc(A) == 4, .etc., you should use a temporary variable so that the IF clause value is only computed once.
I realize that these optimizations are not at the compiler level, but at the programmer level, but that is generally where the problem lies; it is bad programming that causes inefficiency; the compilers do their best, but they can’t do some of these optimizations without causing side effects; maybe the longfunc(A) is doing some updating of extern state, and reducing it to one call would cause a malfunction.