3 ms·
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
by dzaima 2y 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.
- monocasa 2y agoAt 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.
- AstralStorm 2y agoAnd that still ultimately proved slower than JIT and AOT sped up JIT.
- monocasa 2y agoAnd it wasn't targeting devices that had enough spare RAM to run a JIT.