Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array.from() vs new Array().map()
Testing the difference between creating filled arrays.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:151.0) Gecko/20100101 Firefox/151.0
Browser:
Firefox 151
Operating system:
Mac OS X 10.15
Device Platform:
Desktop
Date tested:
one month ago
Array.from()
414K/s
new Array().map()
274K/s
View exact numbers
Test name
Executions per second
✓
Array.from()
413,730 Ops/sec
new Array().map()
274,028 Ops/sec
Tests:
new Array().map()
new Array(500).fill(0).map((_, i) => i)
Array.from()
Array.from({ length: 500 }, (_, i) => i)