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 30838.6 Ops/sec
foreach 3882932.2 Ops/sec
some 2345821.2 Ops/sec
for 25041.3 Ops/sec
for with predefined size 51597.4 Ops/sec
while 940000.8 Ops/sec
Script Preparation code:
Tests:
  • for..in

  • foreach

  • some

  • for

  • for with predefined size

  • while