Script Preparation code:
AخA
 
var arr1 = [];
for(i=0; i<10000; i++){arr1.push(i);}
Tests:
  • for-of normal loop

     
    for (const i of arr1) { i + 1; }
  • for-of slice

     
    for (const i of arr1.slice(1)) { i + 1; }
Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results

Experimental features:

  • Test case name Result
    for-of normal loop
    for-of slice

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: one year ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15
Safari 17 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
for-of normal loop 74841.5 Ops/sec
for-of slice 46015.7 Ops/sec