Measurements for passing buffers to emscriptened functions.
HTML C++ Shell JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
README.md
build.sh
index.html
sum.cpp
sum.js
sum_post.js

README.md

Passing JavaScript Buffers to C/C++ Functions

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.

Usage

  1. Set your emscripten paths in build.sh
  2. Run ./build.sh
  3. Open index.html in your browser.
  4. Check the browser developer console to see the results.

Alternatively, see it live here (the page appears blank, open console to see results).