On Sunday, 14 October 2018 at 19:04:51 UTC, Sebastiaan Koppe wrote:
On Sunday, 14 October 2018 at 06:03:10 UTC, Bogdan wrote:
Awesome work! I remember that, at some point the https://glimmerjs.com/ authors wanted to write their vm in rust for better performance. It looks like D is a new option for such projects.

Bogdan

Thanks, a lot of credits go to LDC for supporting the webassembly backend of LLVM.

I thought about doing a VM as well, specifically because I was afraid of the performance penalty of switching a lot between js and wasm. The idea was to emit all dom operations into one bytebuffer (possibly at compile-time) and then instruct js to execute that.

It turns out jumping between wasm and js isn't really a big deal (at least not anymore), so I ditched that idea to keep things simple.

I saw a recent announcement by the Firefox devs on some massive improvements they've made in the js-wasm switching speed. Its negligible for most cases...unless probably something crazy. Its was very fast...especially for a benchmark of 100 million calls with Math.random()

https://hacks.mozilla.org/2018/10/calls-between-javascript-and-webassembly-are-finally-fast-%F0%9F%8E%89/


Plus, there is a good chance that in the near future wasm will be able to call the browsers' api directly.
Have you seen this? https://developer.mozilla.org/en-US/docs/WebAssembly/Using_the_JavaScript_API

I'm not sure how limited it is though.


Reply via email to