Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Mac OS X 10.15.7
Desktop
2 years ago
Test name Executions per second
Array.from on NodeList 5517.7 Ops/sec
Spread on NodeList 5754.1 Ops/sec
[].slice.call 8421.5 Ops/sec
for each push 8360.5 Ops/sec
for each cached new Array with know listItems length 8637.2 Ops/sec
for loop cached length 5637.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • Array.from on NodeList

  • Spread on NodeList

  • [].slice.call

  • for each push

  • for each cached new Array with know listItems length

  • for loop cached length


;