aboutsummaryrefslogtreecommitdiff
path: root/bench/json-stringify/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-03 19:13:08 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-08-03 19:13:08 -0700
commit440eba7c9bec96849adcf7018ea0371973550bfa (patch)
treee1b6cac7e300be94018193888aa9a3f8949fe67c /bench/json-stringify/bun.js
parentcf81ee5f418c4076cd6def7cc9108997da486869 (diff)
downloadbun-440eba7c9bec96849adcf7018ea0371973550bfa.tar.gz
bun-440eba7c9bec96849adcf7018ea0371973550bfa.tar.zst
bun-440eba7c9bec96849adcf7018ea0371973550bfa.zip
[misc] Fix `make headers`
Diffstat (limited to 'bench/json-stringify/bun.js')
-rw-r--r--bench/json-stringify/bun.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/bench/json-stringify/bun.js b/bench/json-stringify/bun.js
new file mode 100644
index 000000000..dd0f755aa
--- /dev/null
+++ b/bench/json-stringify/bun.js
@@ -0,0 +1,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();