Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
ES6 Optional Chaining vs. Lodash _.get
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/133.0.0.0 Safari/537.36
Browser:
Chrome 133
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
one year ago
Benchmark engine:
Benchmark.js
ES6 Optional Chaining
224.6M/s
Lodash Get
9.0M/s
View exact numbers
Test name
Executions per second
✓
ES6 Optional Chaining
224,554,272 Ops/sec
Lodash Get
9,010,457 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var obj = {a: {b: {c: {d: 1}}}} var badObj = {}
Tests:
ES6 Optional Chaining
obj?.a?.b?.c?.d || 2 badObj?.a?.b?.c?.d || 2
Lodash Get
_.get(obj, "a.b.c.d", 2) _.get(badObj, "a.b.c.d", 2)