Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/106.0.5249.92 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 106
iOS 16.0
Mobile
2 years ago
Test name Executions per second
for of: few items 11137664.0 Ops/sec
for of: many items 319494.9 Ops/sec
convert to array: few items 5177839.5 Ops/sec
convert to array: many items 121939.9 Ops/sec
native iterator: few items 13660684.0 Ops/sec
native iterator: many items 165201.4 Ops/sec
native iterator w/ size: few items 5337161.5 Ops/sec
native iterator w/ size: many items: 339106.3 Ops/sec
Script Preparation code:
Tests:
  • for of: few items

  • for of: many items

  • convert to array: few items

  • convert to array: many items

  • native iterator: few items

  • native iterator: many items

  • native iterator w/ size: few items

  • native iterator w/ size: many items: