Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/93.0.4577.82 Safari/537.36
Chrome 93
Windows
Desktop
3 years ago
Test name Executions per second
for of arr: few items 13616963.0 Ops/sec
for of set: few items 12446554.0 Ops/sec
native loop arr: few items 3632143.0 Ops/sec
native iter set: few items 13155265.0 Ops/sec
for of arr: many items 864121.4 Ops/sec
for of set: many items 541747.8 Ops/sec
native loop arr: many items 15825.5 Ops/sec
native iter set: many items 564363.7 Ops/sec
Script Preparation code:
Tests:
  • for of arr: few items

  • for of set: few items

  • native loop arr: few items

  • native iter set: few items

  • for of arr: many items

  • for of set: many items

  • native loop arr: many items

  • native iter set: many items