Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
fill test
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/119.0.0.0 Safari/537.36 Edg/119.0.0.0
Browser:
Chrome 119
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
fill index
1461358.1 Ops/sec
fill from
1704043.0 Ops/sec
Script Preparation code:
let i, length = 1_000
Tests:
fill index
const a = new Array(length) for(i = 0; i < length; i++) a[i] = 0
fill from
const a = Array.from({length}).fill(0)