Why WebAssembly is so slow? : <p>I'm implementing a Mandelbrot Set visualization using Rust with WebAssmbly, where my goal is to make it using multi-threading.</p>

<p>I've implemented the Mandelbrot Set both in Javascript (using Typescript) and in Rust single-threaded so far. I've made some benchmarks and the Rust implementation is about x17 time slower, and I'm completely lost here, I don't know why I'm getting this bad performance.</p>

<p>Here is the repo, at <code>master</code> the implementation that uses Rust, and in <code>js-implementation</code> the one with Rust.</p>

<p><a href="https://github.com/DanielRamosAcosta/mandlerbot-set-webassembly" rel="nofollow noreferrer">https://github.com/DanielRamosAcosta/mandlerbot-set-webassembly</a></p>

<p>Thanks in advance.</p>
