Script Preparation code:
Tests:
  • Simple for loop - Access index and value

  • Array.forEach - Access index and value

  • for-of + Array.entries

  • for-of - Access value only

  • Simple for loop - Access value only

  • Array.forEach - Access value only

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    Simple for loop - Access index and value
    Array.forEach - Access index and value
    for-of + Array.entries
    for-of - Access value only
    Simple for loop - Access value only
    Array.forEach - Access value only

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 3 months ago)
Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0
Firefox 52 on Windows XP
View result in a separate tab
Test name Executions per second
Simple for loop - Access index and value 234033.3 Ops/sec
Array.forEach - Access index and value 180378.6 Ops/sec
for-of + Array.entries 3078.7 Ops/sec
for-of - Access value only 13891.4 Ops/sec
Simple for loop - Access value only 256694.8 Ops/sec
Array.forEach - Access value only 176127.2 Ops/sec


;