Script Preparation code:
AخA
 
function getRandomInt(max) {
  return Math.floor(Math.random() * Math.floor(max));
}
var a = [...Array(10000)].map(_ => Math.random(1000000));
var ta = (new Int16Array(10000)).map(_ => Math.random(1000000));
Tests:
  • array reverse

     
    a.reverse();
  • typedArray reverse

     
    ta.reverse();
  • array i/o

     
    for (let i = 0; i < 10000; ++i) {
    try{
      a[i] = a[i] + 1;}
    catch(err) {}
    }
  • typedArray i/o

     
    for (let i = 0; i < 10000; ++i)
      ta[i] = ta[i] + 1;
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    array reverse
    typedArray reverse
    array i/o
    typedArray i/o

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 14_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Mobile/15E148 Safari/604.1
Mobile Safari 14 on iOS 14.2
View result in a separate tab
Test name Executions per second
array reverse 128001.6 Ops/sec
typedArray reverse 333553.2 Ops/sec
array i/o 545.8 Ops/sec
typedArray i/o 553.0 Ops/sec