3 ms·
Java bytecode got translated to native too Think we've just got better at runtimes over time (JIT, intermediate formats etc.) and WASM was designed to be good
by youngtaff 5y ago
Java bytecode got translated to native too
Think we've just got better at runtimes over time (JIT, intermediate formats etc.) and WASM was designed to be good for this rather than needed to work with an already exising bytecode
- fmajid 5y agoReflection and other language features preclude direct translation of Java bytecode to machine code, whereas WASM is designed to be a portable assembly language, closer to the IL of GCC or LLVM.
- _old_dude_ 5y agojava -XX:+PrintCompilation prints all methods/loops generated to native code The reflection API has two issues, a security check each time you call a method and the arguments being transformed to objects. The code is still generated to assembly code but the assembly code is slower because of that overhead.