Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
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
Benchmark engine:
Benchmark.js
Object keys
12.5M/s
Lodash test
12.2M/s
View exact numbers
Test name
Executions per second
✓
Object keys
12,464,645 Ops/sec
Lodash test
12,187,245 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);