I’d be interested if they could back this up with code and measurements.
They make a couple of strong statements that seem to be based on empirical experiments, but they do not share their raw data or how to reproduce this result. Without source code, it’s very hard to take these claims at face value.
I agree. The only reason I don’t dismiss it outright is because it’s Daniel Lemire.
Further, there’s no mention of the exact toolchain used here. My understanding from dabbling in Rust targeting WebAssembly that changes in compiler versions, settings, and optimization tools can make enormous differences in both speed and compiled size; I know some people are reporting much better results from using the direct wasm32-unknown-unknown target instead of using emscripten, which this benchmark is likely to use.
Until some of these things are provided, there’s no reason to take anything written in this article as anything more than baseless claims. I’m pretty surprised, seeing as this was written by a university professor, to see these claims made with absolutely no support. Even if it’s a “teaser” for some paper coming later, why post this now and just ask everyone to take it on faith?
I wonder if they were sending wasm.js over every time as well.
As usual the answer seems to be “no”.
Not at all surprising. JIT will beat AOT on long-running performance, higher level representations will be smaller than lower level. Start-up time is the only place that AOT will win, but if code is delivered over the network the benefits are easily lost. This is without considering the past decade of intense competition between some of the largest tech companies on their js performance.
I would think that in theory statically typed languages can achieve higher overall performance than dynamically typed language, mainly for the reason that types provide more actionable information to the compiler, and might move many decisions from runtime to compilation. This is why I believe that in the long term, WASM will definitely outperform JS. Another thing to consider is that the profiling-based compilers (collect runtime data and further optimize based and usage patterns) can also be applied to WASM, so there is an opportunity for WASM to run even faster than native code thanks to dynamic optimization. It’s still relatively new tech, but I think it will bring the Web to its next level as a platform.