3 ms·
I agree that checking assembly output is very good practice and even more important on not-so-common architectures. x86 and ARM compilers are very good now but
by zwieback 16y ago
I agree that checking assembly output is very good practice and even more important on not-so-common architectures. x86 and ARM compilers are very good now but if you're working on a different processor the compiler might not be so good.
Especially on DSPs and microcontrollers you may end up changing instruction order to avoid pipeline stalls or use on-chip RAM buffers for your often used data.
Also, if you start writing a routine in assembly from scratch it's often surprising how many different ways you can implement an algorithm since you're not as bound by the calling conventions and runtime assumptions made by the compiler.
Not that I would recommend that for anything other than the innermost loops.
By the way, are we talking about anything other than C or maybe Fortran here? I'm guessing Java or C# coders don't spend too much time looking at the IL, I know I've only done it for educational purposes.