3 ms·
But he didn't set the compiler option, he rewrote it to explicitly use those instructions, that is micro optimization no matter how you look at it. The reason m
by Jensson 4y ago
But he didn't set the compiler option, he rewrote it to explicitly use those instructions, that is micro optimization no matter how you look at it. The reason micro optimization is so easy to get better than compiler results is that you know things about the data the compiler doesn't, like in this case you know it is fine to reorder the result while the compiler is too dumb to know that. You need much smarter compilers than we have today in order for such micro optimizations to stop paying dividends.
- lmm 4y agoMaking sure it will behave correctly with that change (which changes the result of the function!) is a macro change - you have to trace the implications all the way through the program.