Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36 OPR/82.0.4227.58
Opera 82
Windows 7
Desktop
2 years ago
Test name Executions per second
for 30393.8 Ops/sec
foreach 74513.5 Ops/sec
for..of 75668.0 Ops/sec
for..of over entries 69406.1 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • for..of

  • for..of over entries