mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
40 lines
833 B
JavaScript
40 lines
833 B
JavaScript
var testArray = [
|
|
{
|
|
description: "Random description.",
|
|
testNumber: 123456789,
|
|
testBoolean: true,
|
|
testObject: {
|
|
testString: "test string",
|
|
testNumber: 12345,
|
|
},
|
|
testArray: [
|
|
{
|
|
myName: "test name",
|
|
myNumber: 123245,
|
|
},
|
|
],
|
|
},
|
|
{
|
|
description: "Random description.",
|
|
testNumber: 123456789,
|
|
testBoolean: true,
|
|
testObject: {
|
|
testString: "test string",
|
|
testNumber: 12345,
|
|
},
|
|
testArray: [
|
|
{
|
|
myName: "test name",
|
|
myNumber: 123245,
|
|
},
|
|
],
|
|
},
|
|
];
|
|
|
|
import { bench, run } from "../runner.mjs";
|
|
|
|
bench("structuredClone(array)", () => structuredClone(testArray));
|
|
bench("structuredClone(123)", () => structuredClone(123));
|
|
bench("structuredClone({a: 123})", () => structuredClone({ a: 123 }));
|
|
await run();
|