Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
Chrome 126
Windows
Desktop
4 months ago
Test name Executions per second
querySelectorAll data attr 1135986.5 Ops/sec
querySelectorAll data attr plus node name 543207.8 Ops/sec
querySelectorAll class name 1347921.9 Ops/sec
querySelectorAll class name plus node name 826807.2 Ops/sec
querySelectorAll node name plus class name plus data attr 655400.1 Ops/sec
getElementsByClassName 7383390.5 Ops/sec
HTML Preparation code:
Tests:
  • querySelectorAll data attr

  • querySelectorAll data attr plus node name

  • querySelectorAll class name

  • querySelectorAll class name plus node name

  • querySelectorAll node name plus class name plus data attr

  • getElementsByClassName


;