Script Preparation code:
AخA
 
var a = [...Array(10000)].map(_ => Math.random());
var ta = (new Float64Array(10000)).map(_ => Math.random());
Tests:
  • normal array reverse

     
    a.reverse().reverse().reverse();
  • Float64Array reverse

     
    ta.reverse().reverse().reverse();
  • normal array i/o

     
    for (let i=1; i !== 10000; i=i+1|0) {
      a[i] = a[i] + 1.1 - a[i-1|0];
    }
  • Float64Array i/o

     
    for (let i=1; i !== 10000; i=i+1|0) {
      ta[i] = ta[i] + 1.1 - ta[i-1|0];
    }
  • Swap between arrays

     
    for (let i=0; i !== 10000; i=i+1|0) {
      var tmp = ta[i];
      ta[i] = a[i];
      a[i] = tmp;
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    normal array reverse
    Float64Array reverse
    normal array i/o
    Float64Array i/o
    Swap between arrays

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 27 days ago)
Mozilla/5.0 (iPhone; CPU iPhone OS 18_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3 Mobile/15E148 Safari/604.1
Mobile Safari 18 on iOS 18.3.1
View result in a separate tab
Test name Executions per second
normal array reverse 63726.3 Ops/sec
Float64Array reverse 167734.8 Ops/sec
normal array i/o 13678.7 Ops/sec
Float64Array i/o 27116.9 Ops/sec
Swap between arrays 86851.3 Ops/sec