Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array.from vs spread on Map
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Browser:
Chrome 134
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
Array.from
1907.3 Ops/sec
spread
1960.9 Ops/sec
Tests:
Array.from
const map = new Map() for(let i = 0; i < 10000; i++){ map.set(i,i) } const arr = Array.from(map.values())
spread
const map = new Map() for(let i = 0; i < 10000; i++){ map.set(i,i) } const arr = [...map.values()]