Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0
Firefox 119
Windows
Desktop
one year ago
Test name Executions per second
querySelectorAll + forEach 755488.8 Ops/sec
getElementsByTagName + Array.from + forEach 849058.8 Ops/sec
querySelectorAll + length + for 1292986.1 Ops/sec
getElementsByTagName + length + for 4768749.5 Ops/sec
HTML Preparation code:
Tests:
  • querySelectorAll + forEach

  • getElementsByTagName + Array.from + forEach

  • querySelectorAll + length + for

  • getElementsByTagName + length + for


;