Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
IndexOf vs Includes vs lodash includes
Banana
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 18_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/127.0.6533.107 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 127
Operating system:
iOS 18.0
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
IndexOf
23068074.0 Ops/sec
Includes
22077276.0 Ops/sec
lodash
5970817.0 Ops/sec
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.min.js'></script>
Script Preparation code:
var array = ['banana', 'sausage', 'jesus']
Tests:
IndexOf
array.indexOf('sausage') !== 1
Includes
array.includes('sausage')
lodash
_.includes(array, 'sausage')