3 ms·
That's interesting - I see from some research that you are right in stating that calling from javascript to webassembly is slow[1]. Which is.. kind of surprisi
by sixdimensional 9y ago
That's interesting - I see from some research that you are right in stating that calling from javascript to webassembly is slow[1].
Which is.. kind of surprising, I didn't realize that.
I sort of expected WebAssembly to have a performant JS API, since its origin is in asm.js, which was a peformant subset of javascript - but I see now that asm.js too had this same problem.
Which again surprises me, as I sort of expected it to be a bit like Macromedia Flash, which I recall had a Javascript API that seemed to perform well enough, although I suspect it wasn't used for high-performance scenarios, so maybe not.
It seems odd to me that the interfacing between these two technologies would be so separate that it would cause performance issues.. why would it not be something that is improved? Perhaps you'll have a flip where you write javascript and some other language, and the javascript runs as an interpreted language on the same VM with some compiled code, together...
Hmm.. an interpreted language interfacing with compiled bytecode efficiently... Python.. LISP can do it.. why not Javascript/WebAssembly?
[1] https://github.com/WebAssembly/design/issues/1126 https://github.com/WebAssembly/design/issues/1126