< Compile Options / Optimize Options >
The default for this option is case=auto.
When case=ifthen is specified, the switch statement is expanded using the if_then method, which repeats, for each case label, comparison between the value of the evaluation expression in the switch statement and the case label value. If they match, execution jumps to the statement of the case label. This method increases the object code size depending on the number of case labels in the switch statement. |
When case=table is specified, the switch statement is expanded by using the table method, where the case label jump destinations are stored in a branch table so that a jump to the statement of the case label that matches the expression for evaluation in the switch statement is made through a single access to the branch table. With this method, the size of the branch table increases with the number of case labels in the switch statement, but the performance in execution remains the same. The branch table is output to a section for areas holding switch statements for branch tables. |
When case=auto is specified, the compiler automatically selects the if_then method or table method. |