Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object.assign vs direct assign
(version: 0)
Comparing performance of:
Object.assign vs direct assign
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var prop = 'asdasdasdasd' var fun = () => 'hello' var prop2 = { name: 'Jan', age: 86}
Tests:
Object.assign
const obj = Object.assign({},{prop},{fun},{prop2})
direct assign
const obj = {} obj.prop = prop obj.fun = fun obj.prop2 = prop2
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Object.assign
direct assign
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 mutation assign
Testytesty2
Object.assign vs spreading object copy
Object.assign vs mutation
assign vs direct 2
Comments
Confirm delete:
Do you really want to delete benchmark?