Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Random I/O various arrays
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:138.0) Gecko/20100101 Firefox/138.0
Browser:
Firefox 138
Operating system:
Windows
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
mixed use array
498.1 Ops/sec
single use array
30968.0 Ops/sec
typed array
30937.4 Ops/sec
Script Preparation code:
var a1 = new Array(100000); var a2 = new Array(100000); var a3 = new Float64Array(100000); for (let i = 0; i < 100000; ++i) { const x = Math.random(); a1[i] = x < 0.5 ? Math.random().toString() : x; a2[i] = Math.random(); a3[i] = Math.random(); }
Tests:
mixed use array
for (let i = 0; i < 10000; ++i) { const m = (Math.random() * 10000) | 0; a1[m] = a1[m] + Math.random(); }
single use array
for (let i = 0; i < 10000; ++i) { const m = (Math.random() * 10000) | 0; a2[m] = a2[m] + Math.random(); }
typed array
for (let i = 0; i < 10000; ++i) { const m = (Math.random() * 10000) | 0; a3[m] = a3[m] + Math.random(); }