3 ms·
Honest question: isn’t this problem already addressed by WebAssembly’s binary encoding?
by colejohnson66 9y ago
Honest question: isn’t this problem already addressed by WebAssembly’s binary encoding?
- ZenPsycho 9y agoWebAssembly is a similar idea, but it only encodes the ASM.js subset of javascript, not the full language.
- Yoric 9y agoHere, "the problem" is that parsing JavaScript is very slow (and the second problem is that sending these files can be pretty slow, too). WebAssembly cannot really ship JavaScript code. Well, I guess it could if someone were to write a JavaScript to native compiler and ship it as WebAssembly, but then you would end up with more problems: - yet another JavaScript target, with possible incompatibilities, security issues, etc; - you still need to ship the binaries, which will most likely be much larger (and much slower to parse) than your initial source code; - "interesting" interactions between Wasm-compiled JS and browser-compiled JS, as well as the DOM, garbage-collection, ...