Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
Feature Requests
FAQ
Register
Log In
Run results for:
lodash _.indexOf vs native indexOf
Compare the new ES6 spread operator with the traditional concat() method
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:129.0) Gecko/129.0 Firefox/129.0
Browser:
Firefox Mobile 129
Operating system:
Android
Device Platform:
Mobile
Date tested:
2 years ago
Benchmark engine:
Benchmark.js
array indexOf
33.3M/s
_.indexOf
27.6M/s
View exact numbers
Test name
Executions per second
✓
array indexOf
33,252,824 Ops/sec
_.indexOf
27,625,696 Ops/sec
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 users = [ { 'user': 'joey', 'age': 32 }, { 'user': 'ross', 'age': 41 }, { 'user': 'chandler', 'age': 39 } ]
Tests:
_.indexOf
_.indexOf(users, elem => elem.age < 40)
array indexOf
users.indexOf(elem => elem.age < 40)