5 ms·
WebAssembly
- tyingq 8y agoNot sure why this is posted. There was a page update yesterday about Rust being able to compile to WASM, but that's not really news. https://developer.mozilla.org/en-US/docs/WebAssembly$compare?from=1421740&to=1467286 https://developer.mozilla.org/en-US/docs/WebAssembly$compare...
- Waterluvian 8y agoSo this mentions that wasm can have near native speeds and work alongside JS for performance reasons. Is this currently true or is this more about what the future hopefully looks like? I recall reading that wasm is an in-progress thing and really isn't that fast in comparison yet.
- snek 8y agoIt's currently true, but that doesn't mean wasm is finished yet :) major implementations are working on more efficient baseline compilers to further improve performance.
- diafygi 8y agoIs there load-in lag for wasm functions compared to normal js functions? For example, if I had a wasm math library, and wanted to call a function immediately when the page loaded, would it be able to start returning results as fast as if I just called a native js math function? Or would there be a few seconds while the library loaded/compiled/whatever?
- est31 8y agoYes, load-in lag for wasm functions is in fact smaller than for js functions. See this blog post for more: https://hacks.mozilla.org/2018/01/making-webassembly-even-faster-firefoxs-new-streaming-and-tiering-compiler/ https://hacks.mozilla.org/2018/01/making-webassembly-even-fa...
- stromgo 8y agoThe paper Mind the Gap: Analyzing the Performance of WebAssembly vs. Native Code reports that, on average, WebAssembly is running at 67% of native speed in Firefox and 53% of native speed in Chrome (called 50% slower and 89% slower in the paper). Whether 67% can be called "near" 100% or not is subjective.
- mntmoss 8y agoFor context, these figures are roughly in line with what Java, C#, and other "fast" managed runtimes manage on the Benchmarks Game. [0] Since WASM's MVP is designed towards manual memory management(GC is proposed but not yet specified), there is a good likelihood of the results improving beyond these runtimes. [0] https://benchmarksgame-team.pages.debian.net/benchmarksgame/which-programs-are-fast.html https://benchmarksgame-team.pages.debian.net/benchmarksgame/...
- igouy 8y agoThat paper does not report "WebAssembly is running at 67% of native speed in Firefox and 53% of native speed in Chrome". That paper reports — "… applications compiled to WebAssembly run slower by an average of 50% (Firefox) to 89% (Chrome), with peak slowdowns of 2.6× (Firefox) and 3.14× Chrome)." When you write "53% of native speed" that's really confusing!
- thefounder 8y agoStill no DOM