3 ms·
I wish there was an "about" blurb. Perhaps 2-6 paragraphs explaining what's going on? Although it's obvious that you're comparing JavaScript and WASM performan
by gwbas1c 4y ago
I wish there was an "about" blurb. Perhaps 2-6 paragraphs explaining what's going on?
Although it's obvious that you're comparing JavaScript and WASM performance, the devil is in the details. What exactly are you comparing?
There's quite a bit of overhead in calling out from WASM to the DOM; how are you making WASM faster? How much "JavaScript" is involved in the WASM version? Are you manipulating a Canvas? Generating a bitmap?
- azangru 4y ago> There's quite a bit of overhead in calling out from WASM to the DOM; how are you making WASM faster? If you check out the code, you will notice that wasm isn't talking to the DOM. Its purpose is to generate the image data as a Uint8Array, which is then passed to the canvas [0], same way the javascript implementation does it [0] - https://github.com/dmaynard/chaos-screen-saver/blob/93187f843386e289994777b5d6d097c6e26d7ae3/src/components/ChaosCanvas.vue#L559 https://github.com/dmaynard/chaos-screen-saver/blob/93187f84...
- gwbas1c 4y ago> If you check out the code That's why you need an "about" blurb.