Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
find vs findIndex vs filter with value
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Android 14; Mobile; rv:136.0) Gecko/136.0 Firefox/136.0
Browser:
Firefox Mobile 136
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Array.prototype.find
220537.6 Ops/sec
Array.prototype.findIndex
221226.3 Ops/sec
Array.prototype.filter
207423.2 Ops/sec
Script Preparation code:
var arr = []; var i = 0; while (i <= 1E3) arr[i] = i++;
Tests:
Array.prototype.find
const item = arr.find(item => item == 1E3);
Array.prototype.findIndex
const index = arr.findIndex(item => item == 1E3); const item = arr[index]
Array.prototype.filter
const item = arr.filter(item => item == 1E3)[0];