strudel/packages/mini/bench/mini.bench.mjs
Alex McLean e47d67a9da
Benchmarks (#1079)
* tactus-oriented benchmarks
* add benchmarks for individual example tunes
2024-05-03 10:52:56 +01:00

26 lines
521 B
JavaScript

import { describe, bench } from 'vitest';
import { calculateTactus } from '../../core/index.mjs';
import { mini } from '../index.mjs';
describe('mini', () => {
calculateTactus(true);
bench(
'+tactus',
() => {
mini('a b c*3 [c d e, f g] <a b [c d?]>').fast(64).firstCycle();
},
{ time: 1000 },
);
calculateTactus(false);
bench(
'-tactus',
() => {
mini('a b c*3 [c d e, f g] <a b [c d?]>').fast(64).firstCycle();
},
{ time: 1000 },
);
calculateTactus(true);
});