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
spread
2K/s
Array.from
2K/s
View exact numbers
Test name
Executions per second
✓
spread
1,961 Ops/sec
Array.from
1,907 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()]