Hacker News new | ask | show | jobs
by TekMol 409 days ago
Interesting. Really an order of magnitude?

What types of operations are 10x faster in Wasm than in JS? Why can't the JIT compiler compile JS to the same native code as your Wasm gets compiled to?

2 comments

We have tight inner loops over large numbers of pixels - in some cases optimized to the level of careful register choice and SIMD
Basically everything numerical. I have similar experience, translated some JS code to wasm - simple template matching algorithm, basically doing the same thing (looping over ArrayBuffer and computing some sums) and it was 10x faster.