Optimizing the “One Big Switch” Abstraction in Software