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:146.0) Gecko/20100101 Firefox/146.0
Browser:
Firefox 146
Operating system:
Windows
Device Platform:
Desktop
Date tested:
4 months ago
Test name
Executions per second
mixed use array
302.8 Ops/sec
single use array
4812.1 Ops/sec
typed array
6436.3 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(); }