Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.from vs map
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_5 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/125.0.6422.80 Mobile/15E148 Safari/604.1
Browser:
Chrome Mobile iOS 125
Operating system:
iOS 17.5
Device Platform:
Mobile
Date tested:
one year ago
Test name
Executions per second
Array.from
9988345.0 Ops/sec
Map
3530711.2 Ops/sec
Loop
13558185.0 Ops/sec
Loop push
37545376.0 Ops/sec
Tests:
Array.from
Array.from({ length: 10 }, i => i)
Map
new Array(10).map(i => i);
Loop
const arr = new Array(10); for (let i = 0; i < 10; i++) arr[i] = i
Loop push
const arr = [] for (let i = 0; i < 10; i++) arr.push(i)