Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JS destructuring benchmark
(version: 1)
Comparing performance of:
Destructuring vs Params
Created:
one year ago
by:
Registered User
Go to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function printValueDestructured({ id, value }) { console.log(id + " " + value) } function printValueArgs(value) { console.log(value.id + " " + value.value) }
Tests:
Destructuring
for (i = 0; i < 10000; ++i) { const data = { id: i + "", value: i } printValueDestructured({id: data.id, value: data.value}) }
Params
for (i = 0; i < 10000; ++i) { const data = { id: i + "", value: i } printValueArgs(data) }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Destructuring
Params
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
6 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:147.0) Gecko/20100101 Firefox/147.0
Browser/OS:
Firefox 147 on Mac OS X 10.15
View result in a separate tab
Embed
Embed Benchmark Result
Params
49/s
Destructuring
49/s
View exact numbers
Test name
Executions per second
✓
Params
49 Ops/sec
Destructuring
49 Ops/sec
Related benchmarks
Consume Object.entries vs for..in 2022
object looping
object record find 2
object record find 100000
Comments
Confirm delete:
Do you really want to delete benchmark?