logoalt Hacker News

wasmainiacyesterday at 6:45 PM2 repliesview on HN

Nah, I think the implementation is just off. Graphics need HW acceleration for modern resolutions, but the whole thing should be fine in vanilla JS. Afaik wasm is just an abstraction on top of a jsvm


Replies

bigfishrunningyesterday at 8:08 PM

> Afaik wasm is just an abstraction on top of a jsvm

it is, but as a compiler target there's tons of opportunity for automatic optimization -- in my experience wasm (from rust) tends to be faster then then hand-written js for the same function (although, i'll admit, javascript is far from my strongest language, so take that with a grain of salt)

Sharlinyesterday at 8:14 PM

Wasm objects are what you get in C or other low-level language, with a linear heap and zero metadata. That alone makes it vastly faster and easier to JIT than JavaScript.