Recreate object vs update properties

Benchmark created on


Setup

const consted = {a: 0, b: 1, c: 2}
let letted = {a: 0, b: 1, c: 2}

Test runner

Ready to run.

Testing in
TestOps/sec
Recreate object
letted = {
	a: letted.a + 1,
	b: letted.b + 1,
	c: letted.c + 2
}
ready
Update properties
consted.a = consted.a + 1;
consted.b = consted.b + 1;
consted.c = consted.c + 1;
ready

Revisions

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