Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Write Float64Array by index vs Array by index vs Array by push
Test initializing a typed array by index vs generic array by push.
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Browser:
Chrome 122
Operating system:
Linux
Device Platform:
Desktop
Date tested:
2 years ago
Test name
Executions per second
Write Float64Array by index
2329.7 Ops/sec
Write generic array by index
2437.8 Ops/sec
Write generic array by push
688.9 Ops/sec
Tests:
Write Float64Array by index
const tai = new Float64Array(100_000) for (let i = 0; i < 100_000; i++) tai[i] = 3.14
Write generic array by index
const gai = new Array(100_000) for (let i = 0; i < 100_000; i++) gai[i] = 3.14
Write generic array by push
const gap = [] for (let i = 0; i < 100_000; i++) gap.push(3.14)