Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array range generating
(version: 0)
Comparing performance of:
array fill vs array keys + spread
Created:
6 years ago
by:
Registered User
Jump to the latest result
Tests:
array fill
var result = Array(50).fill(undefined).map((_, index) => index)
array keys + spread
var result = [...Array(50).keys()].map((_, index) => index)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
array fill
array keys + spread
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Related benchmarks:
Array.from() vs new Array()
Creation of new Array: Array.from vs. new Array
Array.from() vs [...new Array()]
Array.from({ length: n }) vs new Array(n)
Array.from() vs new A
Comments
Confirm delete:
Do you really want to delete benchmark?