Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
hasAttribute 4831026.5 Ops/sec
getAttribute 4534571.5 Ops/sec
classList 4327417.5 Ops/sec
hasAttribute single 5295863.5 Ops/sec
getAttribute single 4761751.0 Ops/sec
classList single 4259563.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single


;