Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Destructuring an object
(version: 0)
Comparing performance of:
Destructuring vs NO Destructuring
Created:
2 years ago
by:
Guest
Jump to the latest result
Tests:
Destructuring
const obj = {mobile: {title: "1", subtitle: "2", header: "Header", nav: "Nav", paragraph: "Paragraph", paragraph2: "Paragraph2", paragraph3: "Paragraph2", paragraph4: "Paragraph2", }}; const {title, subtitle, header, nav, paragraph, paragraph2, paragraph3, paragraph4} = obj.mobile; console.log(title); console.log(subtitle); console.log(header); console.log(nav); console.log(paragraph); console.log(paragraph2); console.log(paragraph3); console.log(paragraph4);
NO Destructuring
const obj = {mobile: {title: "1", subtitle: "2", header: "Header", nav: "Nav", paragraph: "Paragraph", paragraph2: "Paragraph2", paragraph3: "Paragraph2", paragraph4: "Paragraph2", }} console.log(obj.mobile.title); console.log(obj.mobile.subtitle); console.log(obj.mobile.header); console.log(obj.mobile.nav); console.log(obj.mobile.paragraph); console.log(obj.mobile.paragraph2); console.log(obj.mobile.paragraph3); console.log(obj.mobile.paragraph4);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Destructuring
NO Destructuring
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:
Assignment of value vs Destructuring an object
Assignment of value vs Destructuring an object v2
Delete vs destructure for objects v2 2
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?