Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/134.0.0.0 Safari/537.36
Chrome 134
Windows
Desktop
2 days ago
Test name Executions per second
hasAttribute 17103048.0 Ops/sec
getAttribute 15875469.0 Ops/sec
classList 14246444.0 Ops/sec
hasAttribute single 22989950.0 Ops/sec
getAttribute single 13832002.0 Ops/sec
classList single 12417081.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single