Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
findIndex vs map
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 139
Operating system:
Android
Device Platform:
Mobile
Date tested:
8 months ago
Test name
Executions per second
findindex
5926550.5 Ops/sec
map
5239454.5 Ops/sec
Tests:
findindex
var test = [{name: 'test1', id: 1}, {name: 'test2', id: 2}, {name: 'test3', id: 3}]; var index = test.findIndex(i => i.name === 'test3');
map
var test = [{name: 'test1', id: 1}, {name: 'test2', id: 2}, {name: 'test3', id: 3}]; var index = test.map(t => t.name).indexOf('test3');