Script Preparation code:
AخA
 
var a = [...Array(10000)].map(_ => Math.random());
var ma = [...a];
ma[5000] = 'string';
var ta = (new Float64Array(10000)).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;
  • mixed array reverse

     
    ma.reverse();
  • mixed array i/o

     
    for (let i = 0; i < 10000; ++i)
      ma[i] = ma[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
    mixed array reverse
    mixed array i/o

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 months ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36
Chrome 131 on Windows
View result in a separate tab
Test name Executions per second
array reverse 158037.7 Ops/sec
typedArray reverse 401878.6 Ops/sec
array i/o 39133.4 Ops/sec
typedArray i/o 39564.8 Ops/sec
mixed array reverse 90206.9 Ops/sec
mixed array i/o 9481.9 Ops/sec