Producing good code for the case statement
Robert L. Bernstein · Software Practice and Experience · 1985
Abstract After summarizing different ways of generating selection code for the case statement, the execution speed of each type of selection code is described using the RISC machine model. A method for combining the selection code schemes is proposed. The method, part of the PL.8 compiler, is flexible enough to handle case‐selector data‐types that have a large range of values, such as the character‐string or floating‐point datatypes, and can be fine‐tuned when the probabilities of the case selector taking on particular values are known.
Cited by 38 works. doi:10.1002/spe.4380151009
References
- Computers and Intractability: A Guide to the Theory of NP-Completeness
- The Design and Analysis of Computer Algorithms
- The 801 minicomputer
- Reference Manual for the ADA Programming Language
- An overview of the PL.8 compiler
- The implementation of case statements in Pascal
- An overview of the PL.8 compiler
- Compilation of the Pascal case statement
- Optimizing two‐state case statements in Pascal