This commit is contained in:
Brooke Vibber 2025-12-23 11:29:00 -08:00
commit 933e7b37a7

View file

@ -13,9 +13,15 @@ Module().then((module) => {
]; ];
for (const bench of benches) { for (const bench of benches) {
console.log(bench); console.log(bench);
// warmup
module[bench]();
const start = performance.now(); const start = performance.now();
// active
module[bench](); module[bench]();
const delta = performance.now() - start; const delta = performance.now() - start;
console.log(`${delta} ms`); console.log(`${delta} ms`);
} }
}); });