Misc.May 9, 2019
BloombergFork()

Stack machines

Why haven't we seen legitimate stack machine computer architectures since at least the 1980s? Last I read is that stack machines make instruction level parallelism impossible so they are crippled in terms of performance

Microsoft Vbsm66 May 9, 2019

You already stated the answer. The entire purpose behind stack machines is to reduce instruction memory footprint, and cache is cheap these days. It's not worth the added headache of implicit instruction dependencies.

Amazon PotatoSale May 9, 2019

What is a stack machine?

Microsoft Vbsm66 May 9, 2019

It's a processor that uses a stack as an implicit register as part of its instruction set

Nvidia GFsi05 May 9, 2019

People have this fetish about wanting to map expression evaluation (which are what stack machines are good at) onto a CPU because that’s what they think the hard part of computation is. It’s not. Memory is where things get hard. And the best way to hide the cost of memory access is finding a bunch of independent instructions to work on at once. Keep in mind I’m talking about computer architecture today, not back in the 80s/90s/00s where chasing ILP was a big deal. Stack machines hide the parallelism of those independent instructions much better than a register based one. So they take one of the easiest parts of computation and make it unnecessarily hard.

Oath slash.com May 10, 2019

Fwiw, the JVM has a stack-based ISA - no registers. When the byte-code is JITed the native machine code does use registers, though.