Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Optional Chaining versus _.get lodash (with obj in the optional chain test)
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 26_2_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/143.0.7499.151 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 143
Operating system:
iOS 26.2.0
Device Platform:
Mobile
Date tested:
4 months ago
Test name
Executions per second
Optional Chaining
460435456.0 Ops/sec
Lodash
12699243.0 Ops/sec
Script Preparation code:
var obj = {a: {b: {c: {d: 1}}}}
Tests:
Optional Chaining
obj.a == null ? undefined : obj.a.b == null ? undefined : obj.a.b.c == null ? undefined : obj.a.b.c.d
Lodash
_.get(obj, "a.b.c.d")