Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Array fill method vs for loop test z
(version: 1)
Array fill method vs for loop performance validation
Comparing performance of:
For Loop fill vs Array Fill
Created:
one year ago
by:
Guest
Go to the latest result
Tests:
For Loop fill
let arrayTest = new Array(1000); for (let i = 0; i < arrayTest.length; i++){ arrayTest[i] = 0; }
Array Fill
let arrayTest = new Array(1000).fill(0);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
For Loop fill
Array Fill
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
7 months ago
)
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:146.0) Gecko/20100101 Firefox/146.0
Browser/OS:
Firefox 146 on Mac OS X 10.15
View result in a separate tab
Embed
Embed Benchmark Result
For Loop fill
429K/s
Array Fill
419K/s
View exact numbers
Test name
Executions per second
✓
For Loop fill
429,396 Ops/sec
Array Fill
418,953 Ops/sec
Related benchmarks
Array fill method vs for loop
Array fill method vs for loop__
Array fill method vs for loop vs push
Array fill vs Array from vs for-loop
Array fill method vs for loop test
Comments
Confirm delete:
Do you really want to delete benchmark?