A sequence of if elses or using short circuit evaluation in place of a switch(I like this a lot) will lower to efficient structures (jump tables etc…) if LLVM thinks it will be faster.
See Do C++ performance optimisations apply to Julia? - #30 by gbaraldi