Clone

Benchmark created on


Setup

const obj = {
	a: '11111',
	b: 111111111,
	c: '1341241',
	d: {
		a: 1111111,
		b: '12231',
		c: false,
		d: {
			a: 1111111,
			b: '12231',
			c: false
		}
	}
}

Test runner

Ready to run.

Testing in
TestOps/sec
json
const newObj = JSON.parse(JSON.stringify(obj))
ready
str
const newObj = structuredClone(obj)
ready

Revisions

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