2 ms·
In my experience you can get a solid 5-10% performance boost just by rearranging order of (independent) asm instructions, sometimes more inside tight loops. Com
by PhilipRoman 2y ago
In my experience you can get a solid 5-10% performance boost just by rearranging order of (independent) asm instructions, sometimes more inside tight loops. Compilers have big tables of what resources each instruction uses and are pretty good at maximizing throughput this way.
If you're willing to put in the time, optimized hand written assembly still reliably beats compilers, especially for vectorization.
- P_I_Staker 2y agoIn some scenarios, it might. You'd hope not these days, because the compiler can see more than you, and it can take a lot of effort to do this kind of analysis. However maybe there are areas you can still find, and I would expect there to be at least some niche applications for writing code more efficiently with ASM. I've heard it's still helpful to reduce code size, if you have space limitations.