Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
Chrome 80
Mac OS X 10.15.4
Desktop
4 years ago
Test name Executions per second
for 86704.9 Ops/sec
foreach 3901252.8 Ops/sec
some 4248859.5 Ops/sec
for..of 135414.4 Ops/sec
while 169689.9 Ops/sec
for..of with array.entries 146507.5 Ops/sec
Script Preparation code:
Tests:
  • for

  • foreach

  • some

  • for..of

  • while

  • for..of with array.entries