Clustering case statements for indirect branch predictors
Evandro Menezes, Sebastian Pop, Aditya Kumar

TL;DR
This paper introduces an efficient O(nlogn) algorithm for compiling switch statements into jump tables, optimizing them for hardware branch predictor performance by limiting table size.
Contribution
It improves existing algorithms by reducing complexity from O(n^2) to O(nlogn) and incorporates a size bound for jump tables to enhance predictor efficiency.
Findings
Reduced algorithm complexity from O(n^2) to O(nlogn)
Implemented size bounds for jump tables
Enhanced hardware branch prediction compatibility
Abstract
We present an O(nlogn) algorithm to compile a switch statement into jump tables. To generate jump tables that can be efficiently predicted by current hardware branch predictors, we added an upper bound on the number of entries for each table. This modification of the previously best known algorithm reduces the complexity from O(n^2) to O(nlogn).
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAlgorithms and Data Compression · Software Testing and Debugging Techniques · Software Engineering Research
