Hacker News new | ask | show | jobs
by neftaly 1010 days ago
Wasm needs to call into JS to do things like manipulate the DOM and use browser APIs, there's an overhead involved.
1 comments

For an idea of that overhead, see this older article: https://hacks.mozilla.org/2018/10/calls-between-javascript-a...

At first, it sounds really promising, like "wow, all the overhead is fixed". Until you get to the bottom and see:

"Currently the only built-ins that we support this for are mostly limited to the math built-ins."

So all those terrible "before" graphs mostly still apply today for most DOM interaction and browser APIs. A few more pieces still aren't done for that to work well. This has some pointers to current state: https://stackoverflow.com/questions/62587845/wasm-dom-access...