Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
JS find vs indexOf 4
(version: 0)
JS find vs findIndex
Comparing performance of:
Array.find vs Array.findIndex
Created:
4 years ago
by:
Guest
Jump to the latest result
Script Preparation code:
var arr = []; var i = 0; while (i <= 30000) arr[i] = i++;
Tests:
Array.find
const item = arr.find(item => item === 23000);
Array.findIndex
const index = arr.findIndex(item => item === 23000);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.find
Array.findIndex
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:
findIndex vs indexOf for simple array 2
find vs findindex with condition test
find vs findIndex (Array prototype methods) stop at first found
JS Array IndexOf vs includes vs findIndex vs find 2
find vs indexOf (Array prototype methods)
Comments
Confirm delete:
Do you really want to delete benchmark?