Tests:
  • For

    AخA
     
    itemList = [0,1,2,3,4,5,6,7,8,9];
    for(let index= 0; index<itemList.legth; index++){
        const count = itemList[index];
    };
  • Foreach

     
    itemList = [0,1,2,3,4,5,6,7,8,9];
    itemList.forEach(item => {
      const count = item;
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    For
    Foreach

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 4 years ago)
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0
Firefox 79 on Ubuntu
View result in a separate tab
Test name Executions per second
For 15458005.0 Ops/sec
Foreach 10651310.0 Ops/sec