Script Preparation code:
AخA
 
var arr = new Uint8Array(1000);
arr.fill(0xff)
Tests:
  • Cache length

     
    var arrLen = arr.length;
    var sum = 0;
    for (var i = 0; i < arrLen; i++){
      sum = arr[i];
    }
  • Do not cache

     
    var sum = 0;
    for (var i = 0; i < arr.length; i++){
      sum = arr[i];
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    Cache length
    Do not cache

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.106 Safari/537.36
Chrome 91 on Windows
View result in a separate tab
Test name Executions per second
Cache length 16420.6 Ops/sec
Do not cache 8107.3 Ops/sec