Re:Register-based VMs have a higher performance than stack-b...
by Someone on Sunday December 11, 2016 @07:28PM
(#13154509)
The main result is hardly surprising. https://www.usenix.org/legacy/events/vee05/full_papers/p153-... (2005) measured the speed difference at 26.5-32.3%. Given the subject, that's not significantly different from the 20.39% reported here (and why do they even report this with two decimals? I'm sure that last digit will change if they do so much as sneeze at their code)
[ Parent
| on HN ]
Re:Register-based VMs have a higher performance than stack-b...
by throwaway4891a on Sunday December 11, 2016 @08:24PM
(#13154795)
Yup. Stack-based is great for high-level language VM interface ease-of-use (ie JVM languages) but generally sucks at the hardware level because most CPUs are register-based: the mapping doesn't scale as well because of the extra overhead of optimal scheduling. A good register-based VM would have a large number of registers/(pseudo)variables and support sequence points to allow actual instructions to be more optimally-scheduled. Atomics are also nice in certain edge-cases, but being mostly immutable / lock-free / branch-free is typically a better strategy to avoid contention and pipeline stalls.
Re:Register-based VMs have a higher performance than stack-b...
by bogomipz on Sunday December 11, 2016 @10:07PM
(#13155196)
>" Stack-based is great for high-level language VM interface ease-of-use (ie JVM languages) but generally sucks at the hardware level because most CPUs are register-based: the mapping doesn't scale as well because of the extra overhead of optimal scheduling"
Is this the graph coloring register allocation optimization problem?