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 36863.8 Ops/sec
foreach 88656.9 Ops/sec
for..of 92216.8 Ops/sec
for..of over entries 82612.4 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • for..of

  • for..of over entries