Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JS string param vs object property as param
(version: 1)
Comparing performance of:
string vs obj
Created:
one year ago
by:
Guest
Jump to the latest result
Script Preparation code:
const testFn = (input) => { // do nothing } const obj = { a: 213, b: 234, c:1, dasd:2 ,sdfjnvdsvhuvdse:4 ,f:6 ,g: 8 ,kjsdgjksfdjksh:5 ,dfbiubdfuij:2 ,k:4 ,ljhbdfhuisdfhiu:4 ,idurghiurgbidsnjkm:1 ,fghj: 7 }
Tests:
string
[Async/Deferred]
testFn('asdfg'); testFn('sdfg');
obj
[Async/Deferred]
testFn(obj.dasd); testFn(obj.fghj);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
string
obj
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Comments
Confirm delete:
Do you really want to delete benchmark?