This PR adds a WASM rabin chunker that works in node and js.
If merged this will be the first wasm module in js-ipfs code base Yay 🚀
some benchmarks on a 100Mb random stream
native rabin x 0.51 ops/sec ±2.56% (7 runs sampled)
wasm rabin x 0.23 ops/sec ±2.72% (6 runs sampled)
js rabin x 0.05 ops/sec ±3.78% (5 runs sampled)
Fastest is native rabin
This makes the wasm version consistently 50% slower (it will only get faster) than native but works in the browser, node 10 and 12 and has no native dependencies.
Regarding size
Package size: 4.66 KB with all dependencies, minified and gzipped
This PR adds a WASM rabin chunker that works in node and js. If merged this will be the first wasm module in js-ipfs code base Yay 🚀
some benchmarks on a 100Mb random stream
native rabin x 0.51 ops/sec ±2.56% (7 runs sampled) wasm rabin x 0.23 ops/sec ±2.72% (6 runs sampled) js rabin x 0.05 ops/sec ±3.78% (5 runs sampled) Fastest is native rabin
This makes the wasm version consistently 50% slower (it will only get faster) than native but works in the browser, node 10 and 12 and has no native dependencies.
Regarding size Package size: 4.66 KB with all dependencies, minified and gzipped
/cc @ipfs/wg-js-core