aboutsummaryrefslogtreecommitdiff
path: root/bench/json-stringify/bun.js
blob: 8c989379441017ccdfff2826860091d08a19f0f9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { bench, run } from "mitata";

bench("JSON.stringify({hello: 'world'})", () =>
  JSON.stringify({ hello: "world" }),
);

const otherUint8Array = new Uint8Array(1024);
bench("Uint8Array.from(otherUint8Array)", () =>
  Uint8Array.from(otherUint8Array),
);

run();