Test name | Executions per second |
---|---|
array reverse | 23236.5 Ops/sec |
typedArray reverse | 152907.1 Ops/sec |
array i/o | 33509.0 Ops/sec |
typedArray i/o | 33313.9 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;