3 ms·
I would expect the switch implementation to not emit any branches. Example: https://godbolt.org/z/Gox7nYfxP https://godbolt.org/z/Gox7nYfxP So it is surprisin
by ridiculous_fish 5y ago
I would expect the switch implementation to not emit any branches. Example:
https://godbolt.org/z/Gox7nYfxP https://godbolt.org/z/Gox7nYfxP
So it is surprising that OP saw branch mispredictions. What compiler and flags were used?