Script Preparation code:
AخA
 
var array = new Array(100);
Tests:
  • forEach

     
    array.forEach(function(i) {
      array[i];
    });
  • map

     
    array.map(function(i) {
      array[i];
    });
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    forEach
    map

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 6 hours ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Chrome 135 on Windows
View result in a separate tab
Test name Executions per second
forEach 8318332.0 Ops/sec
map 6124902.0 Ops/sec