Hacker News new | ask | show | jobs
by dzaima 439 days ago
Directly running wasm/Java bytecode in hardware is just a bad idea unless you somehow have tons of loopless code that'll only be run once; both are stack-based with an unbounded stack size, so each op would have multiple memory loads/stores. At the very least you'd want some rewriting to use multiple registers, at which point a simple JIT/AOT isn't far off.
1 comments

At least for jazelle, R0-R3 were an alias for top of stack, which removed a lot of memory accesses for the stack nature of the ISA.
And that still ultimately proved slower than JIT and AOT sped up JIT.
And it wasn't targeting devices that had enough spare RAM to run a JIT.