3 ms·
> I don’t think they misunderstood anything The code could have made the type-specific sort macros. They could have literally written the code blocks in the ac
by bfgoodrich 4y ago
> I don’t think they misunderstood anything
The code could have made the type-specific sort macros. They could have literally written the code blocks in the actual sort function.
Instead they decided to make it separate functions and mark it inline because that is their overt intention and they thought it was cleaner.
What is the problem? Honestly, aside from noisy, useless griping, what is possibly the problem with that?
Their implication seems to be that inline shouldn't be necessary. And the truth is that it almost certainly isn't necessary, and any optimizing compiler would inline regardless. But clarifying their intentions is precisely what developers should do: "We're moving it here for organizational/cleanliness purpose, but it is intentionally written this way to be inlined because that is the entire point of this optimization".
As to the "unprofiled" use, their specific optimization was because they know the time being wasted in function calls, and the optimization was to avoid that.
- macdice 4y ago(Author of the code here) Yeah :-)