Switch lowering in GCC
Summary
This article analyzes GCC's switch lowering strategies, including jump tables, bitsets, and binary decision trees, with practical examples and a deep dive into the compiler's lowering passes. It explains the heuristics and thresholds GCC uses to decide which form to emit and how those decisions are implemented in GCC's source code.