Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Delete vs destructure for object
(version: 0)
Comparing performance of:
Delete vs Destructure
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const obj = { height: 500, width: 300, _dasgdsa: '321321', onActive: function() { return false; }, onClick: function() {}, hasKey: false, elementRef: { element: {}, children: [] }, hint: 'bla-bla-bla', isEnabled: true, isVisible: true, className: 'box', addChild: function() { return true; }, accKey: 'dasdadasdasd#132132121dsadaf#easedada', };
Tests:
Delete
const obj2 = { ...obj }; ['height', 'width', '_dasgdsa', 'onActive', 'onClick', 'hasKey', 'elementRef', 'hint', 'isEnabled', 'isVisible'].forEach(prop => delete obj2[prop]);
Destructure
const { height, width, _dasgdsa, onActive, onClick, hasKey, elementRef, hint, isEnabled, isVisible, ...obj2, } = obj;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Delete
Destructure
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!
Comments
Confirm delete:
Do you really want to delete benchmark?