Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 Edg/120.0.0.0
Chrome 120
Windows
Desktop
one year ago
Test name Executions per second
children 145.2 Ops/sec
querySelectorAll 171.4 Ops/sec
querySelectorAll(:scope) 162.3 Ops/sec
children.forEach 175.4 Ops/sec
querySelectorAll().forEach 165.8 Ops/sec
querySelectorAll(:scope).forEach 173.2 Ops/sec
HTML Preparation code:
Tests:
  • children

  • querySelectorAll

  • querySelectorAll(:scope)

  • children.forEach

  • querySelectorAll().forEach

  • querySelectorAll(:scope).forEach