Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Test assign vs deconstruct
(version: 1)
Comparing performance of:
Assign vs Deconstruct + rename vs Deconstruct simple
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const a = {id: 12, age: 453, name: "toto", time: new Date()};
Tests:
Assign
const userId = a.id;
Deconstruct + rename
const {id: userId} = a;
Deconstruct simple
const {id} = a;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
Assign
Deconstruct + rename
Deconstruct simple
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36
Browser/OS:
Chrome 133 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Assign
163540672.0 Ops/sec
Deconstruct + rename
173290720.0 Ops/sec
Deconstruct simple
176692704.0 Ops/sec
Related benchmarks:
Variable assignment from object | traditional vs destructuring
Object.assign vs mutation assign
overwrite string vs null vs const two
delete vs deconstruct
Object.assign vs direct copy
const vs direct usages
Object assign vs empty obj
Object assign vs Property change
object property initialize vs add dynamically
Comments
Confirm delete:
Do you really want to delete benchmark?