Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object.assign vs spread operator
(version: 0)
Comparing performance of:
Object.assign vs spread operator vs jQuery extend vs Manual Update
Created:
7 years ago
by:
Guest
Jump to the latest result
Tests:
Object.assign
var params = { b:"hello", c: true, d:7 }; var other = Object.assign({ a: 2 }, params);
spread operator
var params = { b:"hello", c: true, d:7 }; var other = { a: 2, ...params };
jQuery extend
var params = { b:"hello", c: true, d:7 }; var other = $.extend({ a: 2 }, params);
Manual Update
var params = { b:"hello", c: true, d:7 }; params.b = "NEW TEXT";
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (4)
Previous results
Fork
Test case name
Result
Object.assign
spread operator
jQuery extend
Manual Update
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
toFixed -> Number vs Math.round
toFixed() vs Math.round().toString()
toFixed() vs String(Math.floor()
toFixed vs Math.round() with numbers222
Instanceof VS toString for date comparison when using objects
Comments
Confirm delete:
Do you really want to delete benchmark?