Op is not trying to say “the code as is” but “written in c++ style”.
I don’t think they misunderstood anything (and their beef with seemingly unprofiled use of always inline attribute is probably correct too)
Op is not trying to say “the code as is” but “written in c++ style”.
I don’t think they misunderstood anything (and their beef with seemingly unprofiled use of always inline attribute is probably correct too)
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.