Reusing object

Benchmark created on


Description

Just quick test if reusing objects has perf benefits or not

Setup

const object = {
	some: "object",
	that: "has",
	bunch: "of",
	properties: 1,
}
const newPropVal = true

Test runner

Ready to run.

Testing in
TestOps/sec
copy everything
let newObj = {
	...object,
	newProp: newPropVal,
}
ready
reuse the object
let newObj = {
	object,
	newProp: newPropVal,
}
ready

Revisions

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