Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object assign vs Object create with properties
(version: 1)
Comparing performance of:
Object.assign vs Object.create with properties
Created:
4 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
/*your preparation JavaScript code goes here To execute async code during the script preparation, wrap it as function globalMeasureThatScriptPrepareFunction, example:*/ async function globalMeasureThatScriptPrepareFunction() { // This function is optional, feel free to remove it. // await someThing(); }
Tests:
Object.assign
Object.assign(Object.create({}), { property: "hello" });
Object.create with properties
Object.create({}, { property: { value: "hello" } });
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Object.assign
Object.create with properties
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser/OS:
Chrome 143 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Object.assign
1118511.5 Ops/sec
Object.create with properties
1035300.3 Ops/sec
Related benchmarks:
Assigning new variable
undefined to boolean
js mul vs pow
Test direct and destructuring performances
byte double
document.createElement : direct assign vs Object.assign vs setAttribute
Object vs Dictionary
Complex assign vs destructure
Object assign vs Object create with properties vs __proto__
Comments
Confirm delete:
Do you really want to delete benchmark?