Test name | Executions per second |
---|---|
array reverse | 142797.8 Ops/sec |
typedArray reverse | 348571.4 Ops/sec |
array i/o | 42226.1 Ops/sec |
typedArray i/o | 36137.1 Ops/sec |
var a = [Array(10000)].map(_ => Math.random());
var ta = (new Float64Array(10000)).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;