Spread vs structuredClone

Benchmark created on


Setup

const myData = {
    "width": 1170,
    "height": 2532
};

Test runner

Ready to run.

Testing in
TestOps/sec
structuredClone
const result = structuredClone(myData);
ready
spread
const result = { ...myData };
ready

Revisions

You can edit these tests or add more tests to this page by appending /edit to the URL.