3 ms·
Reflection and other language features preclude direct translation of Java bytecode to machine code, whereas WASM is designed to be a portable assembly language
by fmajid 5y ago
Reflection 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.