diff --git a/README.md b/README.md index 7649f99..dde84b3 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,54 @@ console.log(result); ```js const { OpusEncoder, getOpusVersion } = require('mediaplex'); -console.log(getOpusVersion()); // libopus 1.4-6-g9fc8fc4c +console.log(getOpusVersion()); // libopus ... const encoder = new OpusEncoder(48000, 2); const encoded = encoder.encode(buffer); const decoded = encoder.decode(encoded); ``` + +#### Opus Benchmarks + +```js +$ yarn benchmark + +Running "OpusEncoder Benchmark" suite... +Progress: 100% + + mediaplex: + 3 305 ops/s, ±0.15% | 21.18% slower + + @discordjs/opus: + 3 174 ops/s, ±0.09% | 24.3% slower + + opusscript: + 4 193 ops/s, ±0.16% | fastest + + opusscript (no wasm): + 260 ops/s, ±0.55% | slowest, 93.8% slower + +Finished 4 cases! + Fastest: opusscript + Slowest: opusscript (no wasm) + +Running "OpusDecoder Benchmark" suite... +Progress: 100% + + mediaplex: + 11 441 ops/s, ±0.99% | 3.21% slower + + @discordjs/opus: + 11 821 ops/s, ±0.55% | fastest + + opusscript: + 6 095 ops/s, ±0.27% | 48.44% slower + + opusscript (no wasm): + 2 584 ops/s, ±0.52% | slowest, 78.14% slower + +Finished 4 cases! + Fastest: @discordjs/opus + Slowest: opusscript (no wasm) +``` \ No newline at end of file diff --git a/benchmark/results/opus-decoder-benchmark.chart.html b/benchmark/results/opus-decoder-benchmark.chart.html index 0464b47..beaea7b 100644 --- a/benchmark/results/opus-decoder-benchmark.chart.html +++ b/benchmark/results/opus-decoder-benchmark.chart.html @@ -28,7 +28,7 @@