Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
destructuring X undefined X null X delete X new ref X reflect x reflect spread
(version: 0)
Comparing performance of:
Destruct vs Undefined vs Null vs Delete vs New Ref vs Reflect vs Reflect Spread
Created:
5 years ago
by:
Guest
Jump to the latest result
Tests:
Destruct
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; const {password, ...toBeReturned} = user;
Undefined
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; user.password = undefined;
Null
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; user.password = null;
Delete
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; delete user.password;
New Ref
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; const toBeReturned = {email: user.email};
Reflect
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; Reflect.deleteProperty(user, 'password')
Reflect Spread
const user = { email: '123@email.com', password: 'AA&Â&A*&AA' }; Reflect.deleteProperty({...user}, 'password')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (7)
Previous results
Fork
Test case name
Result
Destruct
Undefined
Null
Delete
New Ref
Reflect
Reflect Spread
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.getOwnPropertyDescriptor().value vs Reflect.get()
Object.assign() vs Reflect.set()
Find deep with Assignment of value vs Destructuring an object
Passing as param vs destructuring internally
Assignment of value vs Destructuring an object (direct assign insted of variable )
Comments
Confirm delete:
Do you really want to delete benchmark?