Mandelbrot Set with AssemblyScript / WebAssembly
Plotting the Mandelbrot set with AssemblyScript, a TypeScript-like language that compiles to WebAssembly bytecode.
I’ve translated the code I wrote for plotting the Mandelbrot set with p5.js to AssemblyScript, to get a feel for it.
I measured rendering times on my device, with a 2560x1280 canvas, and got the following results:
Chromium 100 | Firefox 98 | Safari 15.4 | |
---|---|---|---|
p5.js | 546 ms | 788 ms | 809 ms |
AssemblyScript | 241 ms | 175 ms | 241 ms |
Also, the .wasm
file is only 555 B!