Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36
Chrome 92
Mac OS X 10.11.6
Desktop
3 years ago
Test name Executions per second
for 37058.0 Ops/sec
foreach 89726.4 Ops/sec
for..of 92031.6 Ops/sec
for..of over entries 81917.3 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • for..of

  • for..of over entries