3 ms·
There was a time where a sequence of assembly language instructions mapped directly to the processor's actions. But these days, assembly language instructions
by jcl 19y ago
There was a time where a sequence of assembly language instructions mapped directly to the processor's actions. But these days, assembly language instructions are cut up, reordered, and maybe interleaved with instructions from another thread; a conditional jump instruction that once had a constant cycle cost now depends on where that jump went the last dozen times and what is currently in cache.
What happened was that all the programs were being written in C, so the chip makers optimized their chips for C-generated assembly language. So now if you want to write fast assembly language, you need to write it more like a C compiler does -- which means in many cases that you might as well write it in C.