Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Lodash get vs native asdfasdfasdfadsf
(version: 0)
Comparing performance of:
Native vs Lodash.js
Created:
4 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/lodash@4.17.4/lodash.min.js"></script>
Script Preparation code:
var object = { a: { b: { c: { d: { e: 'a' } } } } } var arr = [1, 2, 3, 4]; var nil = null;
Tests:
Native
const val = object && object.a && object.a.b && object.a.b.c && object.a.b.c.d && object.a.b.c.d.e || 'def';
Lodash.js
const val = _.get(object, 'a.b.c.d.e', 'def');
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Native
Lodash.js
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!
Related benchmarks:
Lodash.get vs Property dot notation my test
Lodash get
Lodash test suite
ES6 Optional Chaining vs TS Optional Chaining result in javascript vs vs. Lodash _.get
Lodash.get vs native2
Comments
Confirm delete:
Do you really want to delete benchmark?