Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Delete vs destructure vs reduce for objects
(version: 0)
Measure the performance of delete versus removing a prop from an object
Comparing performance of:
delete vs Rest object vs Reduce
Created:
5 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var obj = { a:1, b:2, c:3 }
Tests:
delete
delete obj.a
Rest object
const { a, ...rest } = obj;
Reduce
const obj2 = Object.keys(obj).reduce((acc, cur) => { if (cur !== 'a') { acc[cur] = obj[cur] } return acc },{})
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
delete
Rest object
Reduce
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:
Delete vs destructure for objects
Delete vs destructure for cloned objects
Delete vs destructure for objects v2 2
Delete vs destructure for objects without mutating 2
Comments
Confirm delete:
Do you really want to delete benchmark?