Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
check property existence
(version: 1)
Comparing performance of:
access or missing vs check before access
Created:
3 hours ago
by:
Registered User
Jump to the latest result
Script Preparation code:
const obj = { string: 'string', number: 7, boolean: true, };
Tests:
access or missing
obj.string ?? false; obj.number ?? false; obj.boolean ?? false; obj.never ?? false;
check before access
'string' in obj && obj.string; 'number' in obj && obj.number; 'boolean' in obj && obj.boolean; 'never' in obj && obj.never;
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
access or missing
check before access
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?