Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Test indexOf vs FindIndex vs include v2
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:130.0) Gecko/130.0 Firefox/130.0
Browser:
Firefox Mobile 130
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Index Of
86260.8 Ops/sec
Find Index
10736.6 Ops/sec
Includes
83978.7 Ops/sec
Index Of last
74654.5 Ops/sec
Find Index last
10411.2 Ops/sec
Includes last
78383.2 Ops/sec
Script Preparation code:
var bigIdList = new Array(15000); bigIdList.fill({ id: 0 }); bigIdList = bigIdList.map((el) => el.id = Math.floor(Math.random() * 15000)) var test = 7500 var last = 15000
Tests:
Index Of
bigIdList.indexOf(test) !== -1
Find Index
bigIdList.findIndex((item) => item === test)
Includes
bigIdList.includes(test)
Index Of last
bigIdList.indexOf(last) !== -1
Find Index last
bigIdList.findIndex((item) => item === last)
Includes last
bigIdList.includes(last)