Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Optional Chaining versus _.get lodash
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36
Browser:
Chrome 147
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
3 months ago
Lodash
14.4M/s
Optional Chaining
0/s
View exact numbers
Test name
Executions per second
✓
Lodash
14,396,976 Ops/sec
Optional Chaining
0 Ops/sec
Script Preparation code:
var obj = {a: {b: {c: {d: 1}}}}
Tests:
Optional Chaining
a == null ? undefined : a.b == null ? undefined : a.b.c == null ? undefined : a.b.c.d
Lodash
_.get(obj, "a.b.c.d")