News for hackers. Stuff that matters.
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
Re:My Favourite Diff by vortico on Monday April 06, 2020 @12:21AM (#22790887)
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