CODE GENERATION
Function
-CswMinLB<number>
<number>: a positive number denoting the number of labels.
Backend-dependent
None
None
Using this option changes the default strategy of the Compiler to use tables for switch statements.
Normally the Compiler uses a table for switches with more than about eight labels. When there are not enough labels for a table, the Compiler generates a branch tree (tree of if-else-if-else). This branch tree, like an `unrolled' binary search in a table, quickly evaluates the associated label for a switch expression.
Using a branch tree instead of a table may increase the code execution speed, but probably increases the code size also. In addition, because the branch tree itself uses no special runtime routine for switch expression evaluation, debugging may be much easier.
To disable any tables for switch statements, set the minimum number of labels needed for a table to a high value (for example, 9999):
-CswMinLB9999 -CswMinSLB9999.
When disabling simple tables it usually makes sense also to disable search tables with the -CswMinSLB option.
Compiler options :