Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36 Edg/122.0.2334.0
Chrome 122
Linux
Desktop
one year ago
Test name Executions per second
children 183.1 Ops/sec
querySelectorAll 178.0 Ops/sec
querySelectorAll(:scope) 181.2 Ops/sec
children.forEach 214.8 Ops/sec
querySelectorAll().forEach 195.1 Ops/sec
querySelectorAll(:scope).forEach 169.0 Ops/sec
HTML Preparation code:
Tests:
  • children

  • querySelectorAll

  • querySelectorAll(:scope)

  • children.forEach

  • querySelectorAll().forEach

  • querySelectorAll(:scope).forEach