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

22 lines
508 B
JavaScript

import { bench, run } from "../runner.mjs";
bench("process.stderr.write('hey')", () => {
process.stderr.write("hey");
});
const long = "hey".repeat(10000);
bench("process.stderr.write('hey'.repeat(10_000))", () => {
process.stderr.write(long);
});
const longUTF16 = "🥟🐰".repeat(10000);
bench("process.stderr.write('🥟🐰')", () => {
process.stderr.write("🥟🐰");
});
bench("process.stderr.write('🥟🐰'.repeat(10_000))", () => {
process.stderr.write(longUTF16);
});
await run();