Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Mobile Safari/537.36
Chrome Mobile 120
Android
Mobile
one year ago
Test name Executions per second
for of: few items 12625431.0 Ops/sec
for of: many items 453143.2 Ops/sec
convert to array: few items 4532271.0 Ops/sec
convert to array: many items 236458.1 Ops/sec
native iterator: few items 13027524.0 Ops/sec
native iterator: many items 454544.2 Ops/sec
native iterator w/ size: few items 6944260.5 Ops/sec
native iterator w/ size: many items: 370789.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: