Simple, quick performance demo / test comparing JavaScript and WebAssembly. Uses fibonacci (n = 40) with 31 runs.
Convert fib.wat
to wasm
using wat2wasm tool and download as fib.wasm
.
Use Node.js 10.
Run:
node index.js
Sample result:
[WASM] total: 21083.41 ms average: 680.11 ms
[JS] total: 38589.46 ms average: 1244.82 ms