Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
IndexOf vs Includes vs lodash includes test2
(version: 0)
Banana
Comparing performance of:
IndexOf vs Includes vs lodash
Created:
5 years ago
by:
Guest
Jump to the latest result
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')
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (3)
Previous results
Fork
Test case name
Result
IndexOf
Includes
lodash
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
IndexOf vs Includes vs lodash includes
IndexOf vs Includes vs lodash includes vs manual check
IndexOf vs Includes vs lodash includes for string
array IndexOf vs array Includes vs lodash indexOf
Comments
Confirm delete:
Do you really want to delete benchmark?