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:
9 months ago
by:
Registered User
Jump 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:
3 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
Test name
Executions per second
Destructuring
48.7 Ops/sec
Params
49.4 Ops/sec
Related benchmarks:
for-in vs for-of
partarum_test1
Consume Object.entries vs for..in 2022
values, for in, keys for
values, for in, keys for part 2
last values test
object looping
object record find 2
object record find 100000
Comments
Confirm delete:
Do you really want to delete benchmark?