3 ms·
Quite a lot of effort goes into compiling switch statements. Jump tables and binary search are likely, as is a mixture of the two based on distribution of cases
by JonChesterfield 4y ago
Quite a lot of effort goes into compiling switch statements. Jump tables and binary search are likely, as is a mixture of the two based on distribution of cases.
I haven't seen computed goto but wouldn't be surprised if some compilers have that as a third option.