Test name | Executions per second |
---|---|
array reverse | 853012.1 Ops/sec |
typedArray reverse | 2047312.0 Ops/sec |
array i/o | 13019.7 Ops/sec |
typedArray i/o | 17672.8 Ops/sec |
var a = [Array(1000)].map(_ => Math.random());
var ta = (new Float32Array(1000)).map(_ => Math.random());
a.reverse();
ta.reverse();
for (let i = 0; i < 10000; ++i)
a[i] = a[i] + 1;
for (let i = 0; i < 10000; ++i)
ta[i] = ta[i] + 1;