4 ms·
You'll probably still have to write the C version anyway, as a fallback if you build on a new architecture and as a reference implementation to test the asm. S
by simias 13y ago
You'll probably still have to write the C version anyway, as a fallback if you build on a new architecture and as a reference implementation to test the asm.
So at that point it's probably valuable to see if you can't get the compiler to generate the correct code by itself in a portable way.
I'm not afraid of writing assembly when I have to but I always consider it a last resort scenario when I really can't get the same result with some good old C.