4 ms·
Originally RISC was a combination of: Small simple instruction set, to minimise the size of the decoder Single cycle execution Aggressive pipelining Replace
by TheOtherHobbes 11y ago
Originally RISC was a combination of:
Small simple instruction set, to minimise the size of the decoder
Single cycle execution
Aggressive pipelining
Replacement of decoder space with a much larger on-chip register space
The theory was everything would work faster. And this was true for a while.
But eventually CISC cache killed the register speed advantage, CISC pipelining became astonishingly clever and killed the pipelining advantage, and the actual difference in efficiency between a CISC instruction decoded to u-ops and compiler translation of complex statements to RISC instructions turned out to be somewhere between not much, nothing, and negative.
So RISC basically wins for relatively low performance low power computing. It's not such a win for anything that requires SIMD, MMX, or any kind of DSP extension - which today means most desktop computing.
The basic problem with the premise is that it's more efficient to cache memory reads and decoded instructions and data than to keep data in registers and assume a pipeline is going to give you cache-like performance for instructions.
In fact, modern CISC chips include the equivalent of a hardware compiler that tries to run an optimised internal RISC machine while also providing the benefits of fast data and u-op caching.
The simple many register model is really a bit old fashioned now.
- AlphaSite 11y agoWell no, doesn't modern x86 have an extremely large number of registers in actuality?
- daemonwrangler 11y agoSort of. The physical register file has more registers than what's specified in the ISA in order to support out-of-order execution. Hardware maps the small number of ISA registers to the larger number of physical registers. All sorts of complex stuff happens in the hardware to make it all work out right (e.g., bypass logic between pipeline stages to make sure dependent instructions are able to use just produced data before it gets stored in the register file). All to give the hardware greater scheduling flexibility. So yes, there are more registers than you'd think by looking at the ISA, but they aren't available to the compiler, which can limit the kinds of optimizations it can make. I think when AMD introduced x86-64, they only increased ISA registers from 8 to 16. RISC ISAs at the time were offering 32-64 (and some also had larger physical register files to support OoO). Granted these days there's also all of the vector registers for SSE/AVX, but you'll need to have vectorizable code to leverage those. All that being said, I don't think cache is a replacement for the register file.