3 ms·
I'd be surprised if they haven't been doing that since the very beginning -- the first compilers from K&R. This is the reason why switch only works with integra
by opinali 14y ago
I'd be surprised if they haven't been doing that since the very beginning -- the first compilers from K&R. This is the reason why switch only works with integral types (and not with any comparable value such as strings): it's intended to be compiled into an efficient table lookup if the range of case values is dense enough.