3 ms·
I'm not sure that's true. There was a highly upvoted post recently on both HN and /r/programming that claimed to have a better sorting algo than libc's sort. Af
by UncleMeat 7y ago
I'm not sure that's true. There was a highly upvoted post recently on both HN and /r/programming that claimed to have a better sorting algo than libc's sort. After hundreds of comments across both forums, looking into compiler explorer showed that the key difference was inlining.
As a C++ person, basically all micro-optimizations start at "look at the damn assembly" since people really suck at predicting what code will actually be generated.
- BubRoss 7y agoHow does inlining happening in C++ mean that the asm in C isn't predictable? Even with inlining the point is mostly the same - there aren't small program changes that lead to big changes in what is generated.