Toggle navigation
MeasureThat
.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Run results for:
array vs Float32Array
Go to the benchmark
Embed
Embed Benchmark Result
Run details:
User agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36
Browser:
Chrome 143
Operating system:
Mac OS X 10.15.7
Device Platform:
Desktop
Date tested:
7 months ago
typedArray reverse
6.7M/s
array reverse
2.2M/s
array i/o
40K/s
typedArray i/o
38K/s
View exact numbers
Test name
Executions per second
✓
typedArray reverse
6,734,483 Ops/sec
array reverse
2,179,698 Ops/sec
array i/o
39,669 Ops/sec
typedArray i/o
38,073 Ops/sec
Script Preparation code:
var a = [...Array(1000)].map(_ => Math.random()); var ta = (new Float32Array(1000)).map(_ => Math.random());
Tests:
array reverse
a.reverse();
typedArray reverse
ta.reverse();
array i/o
for (let i = 0; i < 10000; ++i) a[i] = a[i] + 1;
typedArray i/o
for (let i = 0; i < 10000; ++i) ta[i] = ta[i] + 1;