2 ms·
Doesn't look like it. Each case is a compare and jump: https://godbolt.org/z/KWYEW3d9s https://godbolt.org/z/KWYEW3d9s
by dahfizz 6y ago
Doesn't look like it. Each case is a compare and jump:
https://godbolt.org/z/KWYEW3d9s https://godbolt.org/z/KWYEW3d9s
- ChrisSD 6y agoTurn the gcc version up to 11.
- nitwit005 6y agoPlaying around a bit, it does seem that clang will do so: https://godbolt.org/z/1czW91bMM https://godbolt.org/z/1czW91bMM A presentation on algorithm improvements popped up when looking into it (2015): https://llvm.org/devmtg/2015-10/slides/Wennborg-SwitchLowering.pdf https://llvm.org/devmtg/2015-10/slides/Wennborg-SwitchLoweri...
- deleted 6y ago[deleted]