logoalt Hacker News

oneshteinyesterday at 2:19 PM5 repliesview on HN

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


Replies

flohofwoeyesterday at 3:13 PM

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).

mbrockyesterday at 2:41 PM

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

chilmersyesterday at 2:44 PM

How can a subset of JS do "everything" that JS can do?

show 1 reply
cogman10yesterday at 2:35 PM

Faster? I'm not sure about that. Maybe if you are doing a lot of talk between the compiled and JS runtime/DOM. But otherwise WASM has been much further developed in both Firefox and Chrome.

I don't think Chrome ever did an asm.js specific optimization.

show 1 reply
ramon156yesterday at 2:49 PM

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

show 1 reply