3 ms·
We did that in https://pspdfkit.com/blog/2017/webassembly-a-new-hope/ https://pspdfkit.com/blog/2017/webassembly-a-new-hope/ - WebAssembly is really fast, the d
by steipete 8y ago
We did that in https://pspdfkit.com/blog/2017/webassembly-a-new-hope/ https://pspdfkit.com/blog/2017/webassembly-a-new-hope/ - WebAssembly is really fast, the different is less than you'd expect.
- jsheard 8y agoIt's still getting faster too, e.g. engines are starting to use trap-based bounds checking which greatly reduces overhead when running on 64-bit platforms.
- nneonneo 8y agoCould you elaborate on “trap-based bounds checking”, or provide a reference to learn more? My searching mostly pointed to “trap” as being a WASM concept, rather than some processor feature that improves bounds checks.
- jules 8y agoIt means using the processor's memory protection features to prevent programs from reading memory that they're not supposed to read, rather than inserting check instructions at every memory access.
- jsheard 8y agoYeah, the V8 devs go into detail here: https://docs.google.com/document/d/17y4kxuHFrVxAiuCP_FFtFA2HP5sNPsCD10KEx17Hz6M/edit https://docs.google.com/document/d/17y4kxuHFrVxAiuCP_FFtFA2H... They just recently shipped it on Linux with V8 v6.8, but the Windows implementation is still a work in progress.
- jules 8y agoExcellent post! Webassembly appears to be approximately half as fast as native. Do you know where that gap comes from, and how much of it can be expected to close?