Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array(n) vs Object.assign([], {length: n})
(version: 1)
Comparing performance of:
Array(n) vs assign
Created:
8 months ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<!--your preparation HTML code goes here-->
Script Preparation code:
let {assign} = Object
Tests:
Array(n)
for(let i = 300; i--;) Array(i).fill(i)
assign
for(let i = 300; i--;) Object.assign([],{length:i}).fill(i)
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
Array(n)
assign
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!
Comments
Confirm delete:
Do you really want to delete benchmark?