Provided some hairy conditions, the switch instruction will optimize to a jump table in GCC and probably most C compilers. In ICC, some static analysis is even used to optimize out the test before the switch. In D, final switch might enable such an optimization with statically checking for out-of-enum values.