Lodash keys vs native
Date tested:
4 years ago
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Safari/605.1.15
Test name
Executions per second
lodash
4634073.0 Ops/sec
native
4673635.0 Ops/sec
Benchmark definition (click to collapse):
HTML Preparation code:
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.core.js"></script>
Script Preparation code:
var user = { "name": "neo", "goal": "follow the white rabbit", "quote": "whoa", "role": "the one" }
Tests:
lodash
_.keys(user)
native
Object.keys(user)
Open this result on MeasureThat.net