Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
JS destructuring benchmark
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:141.0) Gecko/20100101 Firefox/141.0
Browser:
Firefox 141
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
9 months ago
Test name
Executions per second
Destructuring
45.3 Ops/sec
Params
45.4 Ops/sec
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) }