Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
lodash findkey vs Object keys
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0
Browser:
Firefox 133
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Object keys
12464645.0 Ops/sec
Lodash test
12187245.0 Ops/sec
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/lodash/4.16.0/lodash.min.js"></script>
Script Preparation code:
var partnerType = {a: 'na', b: 'pos'} var pointOfSaleType = 'na'
Tests:
Object keys
Object.keys(partnerType)[Object.values(partnerType).indexOf(pointOfSaleType)];
Lodash test
_.findKey(partnerType, item => item === pointOfSaleType);