test
This commit is contained in:
parent
42aab84c23
commit
933e7b37a7
1 changed files with 6 additions and 0 deletions
|
|
@ -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`);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue