Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.2 Safari/605.1.15
Safari 16
Mac OS X 10.15.7
Desktop
4 months ago
Test name Executions per second
querySelectorAll data attr 1935038.5 Ops/sec
querySelectorAll data attr plus node name 2057857.4 Ops/sec
querySelectorAll class name 2790187.0 Ops/sec
querySelectorAll class name plus node name 2344493.2 Ops/sec
querySelectorAll node name plus class name plus data attr 2158820.2 Ops/sec
getElementsByClassName 11325749.0 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


;