Run details:
Mozilla/5.0 (Linux; Android 10; SM-G960W) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.66 Mobile Safari/537.36
Chrome Mobile 87
Android
Mobile
4 years ago
Test name Executions per second
for of: few items 5400061.5 Ops/sec
for of: many items 194864.3 Ops/sec
convert to array: few items 1659463.1 Ops/sec
convert to array: many items 115482.4 Ops/sec
native iterator: few items 5158769.0 Ops/sec
native iterator: many items 12306.4 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: