Emscripten provides multiple ways of passing TypedBuffers to emscriptened code.
Many of these way incur internal and hidden copying of the data.
Here are some of them with some minimal profiling code.
- Set your emscripten paths in
build.sh
- Run
./build.sh
- Open
index.html
in your browser. - Check the browser developer console to see the results.
Alternatively, see it live here (the page appears blank, open console to see results).