mutate object props vs spread

Benchmark created on


Setup

let obj = {x:0, y:2, z:3}

Test runner

Ready to run.

Testing in
TestOps/sec
mutate
obj.x +=1;
ready
spread
obj = {...obj, x: obj.x + 1 };
ready

Revisions

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