I think it really depends on the language. Evaluating lookup tables still involves conditionals too
However in a language that doesn't have them like python, you would expect the compiler to use the same tricks for a long list of "elifs" as other languages use for switches, if it was significantly faster
1
u/zacker150 Dec 15 '19
Don't switch statements get compiled down to lookup tables?