| ??? 03/06/02 18:18 Read: times |
#20506 - RE: What is cheap ?, Erik |
"That said, I'm surprised they don't use jump tables for switch statements. That seems pretty straight-forward to me."
Keil certainly does use jump tables in some cases - it probably depends on how many cases there are, and how "sparse" they are? From the v6.23 manual, Optimisation Level 4 includes: "Case/Switch Optimizing: Code involving switch and case statements is optimized as jump tables or jump strings." Optimisation Level 5 includes: "Simple Loop Optimizing: Program loops that fill a memory range with a constant are converted and optimized." Optimisation Level 6: "Loop Rotation: Program loops are rotated if the resulting program code is faster and more efficient." I'm not exactly sure what these "Loop optimisations" are - whether they're the same as Erik mentioned? |



