Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.72 Safari/537.36
Chrome 89
Windows
Desktop
3 years ago
Test name Executions per second
for..in 31161.0 Ops/sec
foreach 3698113.0 Ops/sec
some 2257013.2 Ops/sec
for 24490.8 Ops/sec
for with predefined size 48986.9 Ops/sec
while 919750.5 Ops/sec
Script Preparation code:
Tests:
  • for..in

  • foreach

  • some

  • for

  • for with predefined size

  • while