← Back to context

Comment by oneshtein

3 hours ago

asm.js is faster than WASM, and it can do everything that JS can do.

Congratulations, two spectacularly wrong 'facts' in one short sentence is quite an achievement ;)

It's true that in the beginning (around 2017), WASM wasn't much faster than asm.js, but meanwhile WASM has seen real performance improvements.

Featurewise, asm.js is much closer to WASM than to regular JS, it definitely cannot do everything that regular JS can do (mainly because asm.js is limited to the Number type, it cannot deal with JS strings or objects).

Faster in what browser, by what measure, for what modules? "X is faster than Y" without any concretization is usually meaningless.

WASM wont improve if no one adopts it. Its a chicken and egg issue

  • WASM has been adopted and it has improved massively since 2017 though.

    • Yes, but GC is still useless for languages with interior pointers, some features require gimmicks with server configuration, and for most languages we aren't any way closer to -march=wasm and that's all.

      We still need to download half Internet for emscripten, plus whatever tools are being used on top. Although it is somewhat simpler for those that build on top of binaren.