I should mention: if you really can't get the perf you need out of the compiler after testing (I'd be shocked, but it's possible) then you might want to look into generating computed jump tables.