Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
Optional chaining
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36 OPR/118.0.0.0
Browser:
Opera 118
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
Optional chaining
165.1M/s
Double ampersand
154.0M/s
View exact numbers
Test name
Executions per second
✓
Optional chaining
165,114,192 Ops/sec
Double ampersand
154,047,280 Ops/sec
Script Preparation code:
var node = { value: 'value', data_type: { value: 'data_type_value' } }
Tests:
Double ampersand
if (node.data_type && node.data_type.value) {}
Optional chaining
if (node.data_type?.value) {}