News for hackers. Stuff that matters.
Re:Ask HN: Why did stack-based CPUs lose out? by 082349872349872 on Sunday January 01, 2023 @04:09AM (#34204854)
Stack-orientation makes sense for interpreters, because decode is expensive in software. Hardware has different tradeoffs.
Re:Ask HN: Why did stack-based CPUs lose out? by Morpholemew on Sunday January 01, 2023 @10:26AM (#34207018)
The theory that stacks are better than registers for an interpreter was pretty conclusively disproven by the Lua 5.0 interpreter. See https://www.lua.org/doc/jucs05.pdf (summary: although decode is slightly more expensive per opcode, you have half as many opcodes to decode on average because you get rid of all the stack manipulation instructions)