Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
function(a,b,c) vs function({a,b,c})
(version: 3)
Check how much slower the processing becomes
Comparing performance of:
function(a,b,c) vs function({a,b,c})
Created:
5 months ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
function testA ( a = 0, b = 0, c = 0 ) { return a + b + c; } function testB ( {a = 0,b = 0,c = 0} ) { return a + b + c; }
Tests:
function(a,b,c)
for(i = 0; i < 0x10000; i++){ var obj = {}; if(i % 2 == 0) obj.a = i; if(i % 3 == 0) obj.b = i * i; if(i % 5 == 0) obj.c = i * i * i; var _ = testA(obj.a, obj.b, obj.c); }
function({a,b,c})
for(i = 0; i < 0x10000; i++){ var obj = {}; if(i % 2 == 0) obj.a = i; if(i % 3 == 0) obj.b = i * i; if(i % 5 == 0) obj.c = i * i * i; var _ = testB(obj); }
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
function(a,b,c)
function({a,b,c})
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
2 months ago
)
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:147.0) Gecko/20100101 Firefox/147.0
Browser/OS:
Firefox 147 on Windows
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
function(a,b,c)
570.9 Ops/sec
function({a,b,c})
612.6 Ops/sec
Related benchmarks:
Loops of loops VS. Manual Loops
Test for
arguments vs array arg
cost of inline functions
Comparison benchmark <= vs < vs ==
For loop vs Index Of (1000000 case)
Which equals operator (== vs ===) is faster? 2
JS BigInt big number performance v12
JS if/if vs if/else if vs boolean check
Comments
Confirm delete:
Do you really want to delete benchmark?