3 ms·
> The author is able to achieve a speed-up of ~4x which is close to the 5.89x achieved by the Rust implementation. This is not a fair comparison because the au
by jandem 9y ago
> The author is able to achieve a speed-up of ~4x which is close to the 5.89x achieved by the Rust implementation.
This is not a fair comparison because the author made algorithmic improvements that would also improve the wasm version if applied to the Rust code. Source: https://twitter.com/mraleph/status/965616993310265344 https://twitter.com/mraleph/status/965616993310265344
- mraleph 9y agoFWIW, quick look at Rust code actually reveals that that implementation is also different algorithmically from what I was optimizing, e.g. it only sorts generatedMappings array. In reality it means that performance of my code should not be that far from what WASM is showing because sorting of originalMappings (which I do eagerly and WASM version does lazily) is one third to one half of the overall runtime. I will try to measure and update the post tomorrow or Wednesday.
- hinkley 9y agoIf Mark Twain were alive today, the saying would be "Lies, Damned Lies, Statistics, and Benchmarks"