Re:Branch predictor: How many “if”s are too many?
by azalemeth on Friday May 07, 2021 @04:05AM
(#27073535)
As pointed out above, gcc ≥11 optimises it to a switch / lookup table (https://godbolt.org/z/PxvGKqGrd).
I don’t know my compilers that well but if I had to guess I would say there is a good chance this will be optimized away by the compiler.