Script Preparation code:
Tests:
  • for i++ array

  • while ++i array

  • for in array

  • for of array

  • forEach array

  • for in object

  • for of values object

  • for of pre-initialized-values object

  • forEach pre-initialized-values object

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    for i++ array
    while ++i array
    for in array
    for of array
    forEach array
    for in object
    for of values object
    for of pre-initialized-values object
    forEach pre-initialized-values object

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:95.0) Gecko/20100101 Firefox/95.0
Firefox 95 on Windows
View result in a separate tab
Test name Executions per second
for i++ array 71100104.0 Ops/sec
while ++i array 56139560.0 Ops/sec
for in array 1727565.9 Ops/sec
for of array 11344216.0 Ops/sec
forEach array 14381929.0 Ops/sec
for in object 6757023.5 Ops/sec
for of values object 2972130.8 Ops/sec
for of pre-initialized-values object 10829505.0 Ops/sec
forEach pre-initialized-values object 14695355.0 Ops/sec