Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Destructuring function argument
(version: 1)
destructure an object into a function.
Comparing performance of:
normal args vs object args
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
normal args
function foo(a,b,c){ return a + b + c; } console.log(foo(1,2,3));
object args
function foo({a,b,c}){ return a + b + c; } console.log(foo({a: 1,b: 2,c: 3}));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
normal args
object args
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36
Browser/OS:
Chrome 142 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
normal args
725K/s
object args
705K/s
View exact numbers
Test name
Executions per second
✓
normal args
725,033 Ops/sec
object args
705,150 Ops/sec
Related benchmarks
Assignment of value vs Destructuring an object
Value vs Destructuring an object
pass by value or by object to destructure
Comments
Confirm delete:
Do you really want to delete benchmark?