3 ms·
Since then the result seems to be that stack vs registers, it doesn't really matter as much as people thought. A modern processor that's out of order [1] has to
by jules 14y ago
Since then the result seems to be that stack vs registers, it doesn't really matter as much as people thought. A modern processor that's out of order [1] has to reconstruct the dependencies in the dataflow graph anyway. Out of all the things going on in a processor, doing so from a register ISA or from a stack ISA is not that different. A bare bones stack machine may be smaller than a bare bones register machine, but nobody wants to run those anyway.
http://en.wikipedia.org/wiki/Out-of-order_execution http://en.wikipedia.org/wiki/Out-of-order_execution
- dfox 14y agoOne of problems of stack machines is that it is mostly impossible to build useful out-of-order stack machine (or even in-order multiple issue). Short or non-existent pipelines and low CPI of stack machines tend to offset this for certain classes of code (lots of branching and so), but cannot rival performance of modern register based designs for other classes of code (number crunching).
- tailrecursion 14y agoIt is straightforward to convert stack instructions to 3-address instructions, by keeping a counter -- a stack pointer -- that points into the register file. As instructions are decoded the stack pointer is read and the current reading is delivered on down the pipeline with the instruction itself. From there on, the cpu is executing an instruction that calls out explicit register numbers. The stack counter is kept with the decoder at the very start of the pipeline. This "register number decoder" needs to run sequentially, and it needs to run a faster cycle time than the rest of the cpu.