All Projects → alexcrichton → rust-wasm-benchmark

alexcrichton / rust-wasm-benchmark

Licence: other
No description, website, or topics provided.

Programming Languages

javascript
184084 projects - #8 most used programming language
rust
11053 projects
HTML
75241 projects
WebAssembly
147 projects
shell
77523 projects

Rust Wasm Benchmark

This repo contains some simple benchmarks between handwritten web assembly, wasm-bindgen, and stdweb compilations. The current benchmarks are primarily tailored to benchmark the overhead of function calls between JS and wasm.

This repository is not a general-purpose benchmark between wasm-bindgen and stdweb

Run this benchmark yourelf

Results on Firefox Nightly as of 2018-08-31:

Test raw *.wast wasm-bindgen stdweb
JS->Wasm Thunk (1000000) 8ms 9ms 46ms
JS->Wasm Thunk (10000000) 50ms 77ms 384ms
JS->Wasm Thunk (100000000) 468ms 743ms 2717ms
Wasm->JS Thunk (1000000) 4ms 6ms 48ms
Wasm->JS Thunk (10000000) 43ms 42ms 418ms
Wasm->JS Thunk (100000000) 370ms 411ms 4165ms
JS->Wasm Add (1000000) 5ms 7ms 32ms
JS->Wasm Add (10000000) 47ms 77ms 284ms
JS->Wasm Add (100000000) 445ms 875ms 2762ms
Wasm->JS Add (1000000) 9ms 15ms 94ms
Wasm->JS Add (10000000) 61ms 93ms 744ms
Wasm->JS Add (100000000) 593ms 843ms 6871ms
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].