SEARCH

SEARCH BY CITATION

Keywords:

  • Case statement;
  • Code generation

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.