Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
Chrome 111
Linux
Desktop
one year ago
Test name Executions per second
for of: few items 13090926.0 Ops/sec
for of: many items 334361.8 Ops/sec
convert to array: few items 4774200.0 Ops/sec
convert to array: many items 244484.5 Ops/sec
native iterator: few items 12128659.0 Ops/sec
native iterator: many items 264611.9 Ops/sec
native iterator w/ size: few items 7248657.0 Ops/sec
native iterator w/ size: many items: 260976.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: