Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object.assign vs spread operator for settting values
(version: 0)
Comparing performance of:
Object.assign vs spread operator vs jQuery extend
Created:
6 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
Tests:
Object.assign
var params = { b:"hello", c: true, d:7 }; var other = Object.assign({ b:"world", c: false, d:2 }, params);
spread operator
var params = { b:"hello", c: true, d:7 }; var other = { b:"world", c: false, d:2, ...params };
jQuery extend
var params = { b:"hello", c: true, d:7 }; var other = $.extend({ b:"world", c: false, d:2 }, params);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Object.assign
spread operator
jQuery extend
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:
Object.assign vs spread -- No jQuery
Object.assign vs spread operator (without jquery)
Object.assign vs spread operator without jquery
Object.assign vs spread operator screw jquery
Comments
Confirm delete:
Do you really want to delete benchmark?