3 ms·
> Webassembly Is Faster Than Javascript Just curious, how's the OP measuring this? Also, would be very interested in the stack - is OP using Yew/Seed/etc or se
by rkwz 6y ago
> Webassembly Is Faster Than Javascript
Just curious, how's the OP measuring this? Also, would be very interested in the stack - is OP using Yew/Seed/etc or server rendered pages with Rust?
- nicolodavis 6y agoI'm just using an SPA written in Svelte on the frontend. I only use Rust for the game state updates. About measurements, I just whipped up a quick benchmark comparing the JavaScript state updates with the WASM version. You do pay a cost crossing the JS / WASM boundary, but the WASM version is faster overall for my application. I'm not particularly concerned with performance at the moment (it was just a nice to have).
- danielheath 6y agoPresumably the argument is 'webassembly optimizes better', which is true provided you aren't crossing runtime boundaries (between wasm/js or js/browser api) too frequently.