mirror of
https://github.com/darksaid98/mediaplex.git
synced 2026-12-02 06:28:51 +00:00
chore: update benchmark with real sample
This commit is contained in:
1 parent
e34aedde25
commit
aadd415d6a
8 files changed
+73
-82
No files matched your search
+12
-7
@@ -8,7 +8,8 @@ import {
|
||||
createOpusScriptWasmEncoder,
|
||||
generateOpusSample,
|
||||
createEvanOpusDecoder,
|
||||
createEvanOpusDecoderWasm
|
||||
createEvanOpusDecoderWasm,
|
||||
createSimdEvanOpusDecoder
|
||||
} from './common.mjs';
|
||||
|
||||
const config = {
|
||||
@@ -23,6 +24,7 @@ const wasmEncoder = createOpusScriptWasmEncoder(config);
|
||||
const asmEncoder = createOpusScriptAsmEncoder(config);
|
||||
const evanOpus = createEvanOpusDecoder(config);
|
||||
const evanOpusWasm = createEvanOpusDecoderWasm(config);
|
||||
const evanWasmOpus = createSimdEvanOpusDecoder(config);
|
||||
|
||||
const SAMPLE = generateOpusSample();
|
||||
|
||||
@@ -33,18 +35,21 @@ mitata.group('OpusDecoder', () => {
|
||||
mitata.bench('@discordjs/opus', () => {
|
||||
nativeEncoder.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('@evan/opus', () => {
|
||||
evanOpus.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('@evan/opus (wasm)', () => {
|
||||
evanOpusWasm.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('opusscript', () => {
|
||||
wasmEncoder.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('opusscript (no wasm)', () => {
|
||||
asmEncoder.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('@evan/opus', () => {
|
||||
evanOpus.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('@evan/opus (wasm)', () => {
|
||||
evanOpusWasm.decode(SAMPLE);
|
||||
});
|
||||
mitata.bench('@evan/wasm', () => {
|
||||
evanWasmOpus.decode(SAMPLE);
|
||||
});
|
||||
});
|
||||
|
||||
await mitata.run();
|
||||
Reference in new issue
Block a user