Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array fill vs spread
Array fill method vs for loop performance validation
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0
Browser:
Firefox 135
Operating system:
Ubuntu
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
For Loop fill
1.8 Ops/sec
Array Fill
2.0 Ops/sec
Tests:
For Loop fill
let arrayTest = [...new Array(10000000)].map(() => null);
Array Fill
let arrayTest = new Array(10000000).fill('').map(() => null);