4 ms·
IIRC, Microsoft wants you to use intrinsics because it plays better with their register coloring and code reordering optimizations. Unless there's an instructi
by CoolGuySteve 9y ago
IIRC, Microsoft wants you to use intrinsics because it plays better with their register coloring and code reordering optimizations.
Unless there's an instruction you need that doesn't have an intrinsic or you're writing something like a spin lock where instruction ordering is critical and a compiler barrier for some reason is not sufficient, there's no reason to ever write assembly.
Your code won't be appreciably faster than if you tuned it in the compiler, and after a few years the compiler will integrate new instructions while your assembly just gets stale.
- xorblurb 9y ago> Unless there's an instruction you need that doesn't have an intrinsic or you're writing something like a spin lock where instruction ordering is critical and a compiler barrier for some reason is not sufficient, there's no reason to ever write assembly. So there are reasons to write code in assembly language.
- CoolGuySteve 9y agoOK, there's no reason for YOU to write code in assembly.
- xorblurb 9y agoFor me, personally? I occasionally can write that kind of stuff.