Files
bun.sh/bench/snippets/atob.mjs
Michael H b54137174b Bench updates (#15029)
Co-authored-by: RiskyMH <RiskyMH@users.noreply.github.com>
2024-11-08 23:15:24 -08:00

14 lines
272 B
JavaScript

import { bench, run } from "../runner.mjs";
function makeBenchmark(size) {
const latin1 = btoa("A".repeat(size));
bench(`atob(${size} chars)`, () => {
atob(latin1);
});
}
[32, 512, 64 * 1024, 512 * 1024, 1024 * 1024 * 8].forEach(makeBenchmark);
await run();