goto [variable], and address of code labels

ponce spam at spam.org
Fri Oct 28 11:57:02 PDT 2011


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.


More information about the Digitalmars-d mailing list