Feedback-Directed Switch-Case Statement Optimization

Peng Zhao, José Nelson Amaral · 2005

This paper presents two new feedback-guided techniques to generate code for switch-case statements: hot default case promotion (DP) and switch-case statement partitioning (SP). DP improves case dispatch while SP simplifies case dispatch, improves instruction layout and enables further inlining. An extensive experimental study reveals up to 4.9% performance variations among different strategies. The largest performance improvement of DP and SP over existing O3 optimization in the open research compiler (ORC) is 1.7%. A micro-architecture level performance study provides insights on the basis for this performance improvement.

Read the paper · More papers on PaperTik