Script Preparation code:
AخA
 
const planes = new Array(1_000_000).fill(2);
Tests:
  • for-of

     
    for (const plane of planes) {
        Math.sqrt(plane);
    }
  • for-index

    x
     
    for (let i = 0; i < planes.length; i++) {
        const plane = planes[i];
        Math.sqrt(plane);
    }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for-of
    for-index

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 18 hours ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:136.0) Gecko/20100101 Firefox/136.0
Firefox 136 on Windows
View result in a separate tab
Test name Executions per second
for-of 144.7 Ops/sec
for-index 756.7 Ops/sec