Earlier quoted context omitted.
JavaScript will typically have better performance than WASM. WASM is good for porting existing software to the web. So if you have tens thousands of engineering hours dumped into some game engine that engine can be brought to the web instead of having to duplicate that work with a rewrite. Using javascript apis from WASM isn't possible and requires you to do extra copies. Yes, there are optimizations that browsers ca…
“Preliminary results show that WebAssembly, while still in its infancy, is starting to already outperform JavaScript, with much more room to grow,” https://thenewstack.io/javascript-vs-wasm-which-is-more-ener...
The paper more shows that if you are building a virtual machine in the browser you should use WASM. I agree that is a sensible choice.