English

Clustering case statements for indirect branch predictors

Data Structures and Algorithms 2019-11-05 v3 Computational Complexity Performance

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).

Cite

@article{arxiv.1910.02351,
  title  = {Clustering case statements for indirect branch predictors},
  author = {Evandro Menezes and Sebastian Pop and Aditya Kumar},
  journal= {arXiv preprint arXiv:1910.02351},
  year   = {2019}
}
R2 v1 2026-06-23T11:35:27.478Z