Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/lanesawyer/wasm-canvas-test


https://github.com/lanesawyer/wasm-canvas-test

Last synced: 14 days ago
JSON representation

Awesome Lists containing this project

README

        

# WASM Canvas Test

This is a small experiment to compare the differences in speed between WASM and JS when drawing items on a `canvas`.

On my personal machine, I was getting the full WASM page to load in about 250 ms, while the JS one was around 290 ms. Not a huge difference, and maybe I have subtle differences in the code that I'm not seeing, but I was surprised WASM beat it!

## How to Test

1. Run `trunk build` to get a `dist` folder
2. Run `npx simple-server dist` to serve the WASM code folder
3. Run `npx simple-server .` to serve the JS items
4. Pull up each page
5. Open the network tab
6. Refresh and compare!