Earlier quoted context omitted.
> WebAssembly probably won't [have a GC] for some time Citation needed :) > It also doesn't have ~20 years of performance tuning on different microarchitectures the way the JVM does. JS engines have been tuned very well over the years. Remember that Web Assembly is designed to run in a JS engine.
> Remember that Web Assembly is designed to run in a JS engine. Is it? It's a very low-level bytecode that's designed to be efficiently compiled in one pass, and completely unrelated to the JS engine. It isn't meant (at least at this time) to have an optimizing JIT (like HotSpot or V8). It is meant as a good target for languages that don't rely on/can't benefit greatly from good JIT optimizations, such as C/C++ (or R…
Indeed, wasm won't likely ever expose directly executable memory. But in the future it may expose JIT capabilities like creating and calling new functions, declaring "patchable" code fragments which can be manipulated through APIs, and so on, and with these capabilities it isn't unreasonable to think about porting JITing VMs onto wasm.