Stack Computers: the new wave

2 points by veqq


snej

Stack-based CPU architectures seem to have been a dead end. I assume a major factor is the increasing expense of accessing RAM vs registers; note how modern ABIs even pass parameters and return values in registers not the stack.

I do remember a 1980s CPU (by AMD? Maybe the 29000?) that was entirely stack-based but kept the top of the stack (maybe 64 elements?) in on-chip cache that was as fast to access as registers. When a stack access overflowed it triggered a sort of page fault that would slide the cache by some quantum, reading and writing RAM.

Obviously modern CPUs have lots of L1 cache, and the stack is hot enough to stay in L1, but using registers must still be faster — probably due to details of pipelining that are beyond my limited knowledge.