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

11 lines
210 B
JavaScript

import { bench, run } from "../runner.mjs";
const encoder = new TextEncoder();
const buffer = new Uint8Array(1024);
bench("encodeInto", () => {
encoder.encodeInto("Hello World!", buffer);
});
await run();