Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array fills
(version: 0)
Comparing performance of:
Array.from vs Array.fills
Created:
one year ago
by:
Guest
Jump to the latest result
Tests:
Array.from
Array.from({ length: 1000 }, () => Array(1000).fill(false));
Array.fills
Array(1000).fill(null).map(() => new Array(1000).fill(false));
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array.from
Array.fills
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Browser/OS:
Chrome 129 on Mac OS X 10.15.7
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
Array.from
405.1 Ops/sec
Array.fills
418.4 Ops/sec
Related benchmarks:
Array.from vs. Array/fill/map
Array filling
Create empty array
functional vs fill
Array.from vs new Array
Array.from vs new Array2000
fill then map (with null/undefined/"") vs array.from
Array.from vs Array.fill Simple
Comments
Confirm delete:
Do you really want to delete benchmark?