Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Array fill vs loop
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/152.0.0.0 Safari/537.36
Browser:
Chrome 152
Operating system:
Windows
Device Platform:
Desktop
Date tested:
19 days ago
fill
54K/s
for
2K/s
View exact numbers
Test name
Executions per second
✓
fill
54,357 Ops/sec
for
1,596 Ops/sec
Script Preparation code:
var iterations = 10000;
Tests:
for
const array = []; for (i = 0; i < iterations; i++) { array[i] = i; }
fill
Array(iterations).fill('')