Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
find vs findIndex (Array prototype methods) object
(version: 0)
Measuring which is faster
Comparing performance of:
Array.prototype.find vs Array.prototype.findIndex
Created:
4 years ago
by:
Guest
Go to the latest result
Script Preparation code:
var arr = []; var i = 0; while (i <= 1E5) arr[i] = i++;
Tests:
Array.prototype.find
const item = arr.find(item => item == 1E5);
Array.prototype.findIndex
const index = arr.findIndex(item => item == 1E5); const item = arr[index]
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.prototype.find
Array.prototype.findIndex
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Browser/OS:
Chrome 135 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Array.prototype.find
2K/s
Array.prototype.findIndex
2K/s
View exact numbers
Test name
Executions per second
✓
Array.prototype.find
1,614 Ops/sec
Array.prototype.findIndex
1,583 Ops/sec
Related benchmarks
find vs findIndex (Array prototype methods)
find vs findIndex (Array prototype methods) 22
find vs findIndex (Array prototype methods) stop at first found
find vs indexOf (Array prototype methods)
find vs findIndex (Array prototype methods) - using objects
Comments
Confirm delete:
Do you really want to delete benchmark?