Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
Item getting in typed array vs simple array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (X11; Linux x86_64; rv:131.0) Gecko/20100101 Firefox/131.0
Browser:
Firefox 131
Operating system:
Linux
Device Platform:
Desktop
Date tested:
one year ago
Test name
Executions per second
typedArray
2445493504.0 Ops/sec
array
563880512.0 Ops/sec
Script Preparation code:
var size = 1024; var typedArray = new Float64Array(size); var array = new Array(size); for(let i = 0; i < size; i++) { typedArray[i] = Math.random(); array[i] = Math.random(); }
Tests:
typedArray
const a = typedArray[Math.round(Math.random() * size)]
array
const a = array[Math.round(Math.random() * size)]