start-node.sh
JS vs Wasm benchmark, when perform the same basic operations on an image's pixels.
- The average pixel value (R+G+B) of the image is computed with WebAssembly.
- A benchmark of JS vs Wasm duration to perform the operations is performed (over multiple iterations) - see below the image.
-
Install the dependencies:
$ npm install
-
Start the demo:
$(npm bin)/parcel index.html parcel serve index.html --public-url /
-
Visit
http://localhost:1234
with your browser.
Boilerplate used: https://github.com/koute/stdweb/tree/master/examples/hasher-parcel
A parcel plugin is used to integrate cargo-web
with Parcel.
Source: https://github.com/koute/stdweb/tree/master/examples/hasher-parcel