Re:My Favourite Diff
by bla3 on Monday April 06, 2020 @12:10AM
(#22790841)
That's only true if there are <= 3 "clusters" of switch case values, else compilers do smarter things. See https://youtu.be/gMqSinyL8uk
[ Parent
| on HN ]
Is this what you mean by more clusters? Looks like clang compiles the two functions to roughly the same "tree search" code. https://godbolt.org/z/7M_3PU