aboutsummaryrefslogtreecommitdiff
path: root/bench/snippets/encode-into.mjs
blob: 5275b6f108f9c8d9153e2a00e03952fe2b99bb1f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
import { run, bench } from "../node_modules/mitata/src/cli.mjs";

const encoder = new TextEncoder();

const buffer = new Uint8Array(1024);
bench("encodeInto", () => {
  encoder.encodeInto("Hello World!", buffer);
});

await run();