3rd Workshop on Compiler-Driven Performance

October 06, 2004
Hilton Suites Toronto/Markham Conference Centre
Markham, ON

Associated with CASCON 2004


Profile-Guided Switch Statement Case Dispatching

Peng Zhao - University of Alberta

In a number of important appliations, such as parsers and interpreters, large switch case statements are executed often. In such applications, it is important to implement efficient case dispatching to improve the performance of such statements. Through profiling we discovered that sometimes the default action of a switch case statement is selected often in some applications. Thus we developed a technique called Default Case Promotion (DP) which accelerates dispatches in this situation. We also use feedback information to develop a Switch Case Partitioning (SP) technique that enables improved inlining. In this talk we describe the implementation of these two techniques in the Open Research Compiler (ORC) and present results from an extensive experimental performance study that includes all the known techniques for case dispatching in switch case statements.

Presentation Slides.