Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Map.get versus Array.find for 1000 elements
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) SamsungBrowser/25.0 Chrome/121.0.0.0 Mobile Safari/537.36
Browser:
Chrome Mobile 121
Operating system:
Android
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Map.get
4531271.5 Ops/sec
Array.find
3236547.5 Ops/sec
Script Preparation code:
data = [...Array(1000)].map((_, id) => ({ id, data: Math.random() })) map = new Map(data.map(v => [v.id, v]))
Tests:
Map.get
const res = map.get(50)
Array.find
const res = data.find(({ id }) => id === 50)