3 ms·
WASM is not a good solution in a lot of situations. In short: - you have to package your complete runtime in the Wasm binary, this leads to a large binary and
by jraph 5y ago
WASM is not a good solution in a lot of situations. In short:
- you have to package your complete runtime in the Wasm binary, this leads to a large binary and memory footprint
- DOM manipulation requires calling Javascript code, and calling JS from WASM is costly
- hazz99 5y agoYou only need to package your runtime if you’re using a language that requires a runtime :) Languages that perform their own memory management (C, C++, Rust etc) will be extremely small. Just one big array of bytes/instructions.
- jraph 5y agoyou still need to provide their standard library, at least the subset used by your program
- hazz99 5y agoThat’s the same for everything, no? I assume most JavaScript websites come packaged with their (transpiled, minified) versions of the “standard library” of whatever framework they’re using. And that has to be transmitted as gzipped bundles of plaintext javascript. Further, tree shaking is much harder with a dynamic language. My understanding is that a WebAssembly implementation would usually be smaller than a JavaScript one, assuming you’re using a language without a runtime.