Re:Wasm3 – A high performance WebAssembly interpreter in C
by newnewpdro on Sunday January 12, 2020 @11:38PM
(#22031879)
I suspect they're just saying they'd rather see a CPU implementing the wasm isa, in a facetious way.
[ Parent
| on HN ]
Re:Wasm3 – A high performance WebAssembly interpreter in C
by sebcat on Monday January 13, 2020 @02:57AM
(#22032664)
AVR32 with JEM does this to some extent for Java.
http://ww1.microchip.com/downloads/en/devicedoc/doc32000.pdf
3. Java Extension Module
The AVR32 architecture can optionally support execution of Java bytecodes by including a JavaExtension Module (JEM).
This support is included with minimal hardware overhead.
EDIT: Not by implementing the ISA verbatim, but still neat though
Re:Wasm3 – A high performance WebAssembly interpreter in C
by saagarjha on Monday January 13, 2020 @06:17AM
(#22033467)
ARM tried to do this with Jazelle, but the effort floundered: https://en.wikipedia.org/wiki/Jazelle
Re:Wasm3 – A high performance WebAssembly interpreter in C
by MaxBarraclough on Monday January 13, 2020 @02:47PM
(#22037865)
It doesn't make much sense to build hardware to run an intermediate language. Java bytecode isn't optimised; almost all optimisation is meant to happen in the JIT. If you build a processor that runs bytecode directly, when does the optimisation occur? Presumably never.
Low-horsepower platforms are probably the best place to give it a go, as they may struggle to run a respectable JIT compiler, but as you say, Jazelle didn't catch on.
Re:Wasm3 – A high performance WebAssembly interpreter in C
by naasking on Monday January 13, 2020 @08:25PM
(#22040870)
The hardware would perform the optimisation using typical means. Instruction lookahead can be used for caching the stack slots to be used in registers, for instance.
Re:Wasm3 – A high performance WebAssembly interpreter in C
by MaxBarraclough on Tuesday January 14, 2020 @06:29PM
(#22050303)
> The hardware would perform the optimisation using typical means.
The HotSpot JIT is an impressive feat of compiler engineering. The advanced optimisations it performs cannot practically be performed in hardware.
Modern CPUs are capable of, for instance, loop-detection, but they haven't put optimising compilers out of a job, and never will.
Jazelle would add no value on a modern ARM server, for instance. You'd get far better performance out of HotSpot, or some other modern JVM.