Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Object assign vs Object create with properties vs __proto__
(version: 1)
Comparing performance of:
Object.assign vs Object.create with properties vs Object.__proto__
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" } });
Object.__proto__
({ property: "hello", __proto__: {} });
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Object.assign
Object.create with properties
Object.__proto__
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
4 months ago
)
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Mobile Safari/537.36
Browser/OS:
Chrome Mobile 143 on Android
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Object.assign
468211.8 Ops/sec
Object.create with properties
410988.6 Ops/sec
Object.__proto__
349250.2 Ops/sec
Related benchmarks:
Assigning new variable
js mul vs pow
Test direct and destructuring performances
byte double
Various ways of object creation
document.createElement : direct assign vs Object.assign vs setAttribute
Object vs Dictionary
Complex assign vs destructure
Object assign vs Object create with properties
Comments
Confirm delete:
Do you really want to delete benchmark?