Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Lodash.get vs object-path vs Property dot notation
Modified from https://gist.github.com/acao/018fa0943da0e39c96f57fca64cd0c02
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 119
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Test name
Executions per second
Lodash get
2583507.5 Ops/sec
object path
1433219.1 Ops/sec
Native
3941384.8 Ops/sec
HTML Preparation code:
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.4/lodash.min.js" type="text/javascript"></script> <script src="https://cdn.rawgit.com/mariocasciaro/object-path/master/index.js"></script>
Script Preparation code:
var obj = { stuff: { things: { stuff: 'things', things: 'stuff', other: { stuff: 'things' } } } };
Tests:
Lodash get
_.get(obj, 'stuff.things.other.stuff');
object path
objectPath.get(obj, 'stuff.things.other.stuff');
Native
obj.stuff && obj.stuff.things && obj.stuff.things.other && obj.stuff.things.other.stuff;