Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/103.0.0.0 Safari/537.36
Chrome 103
Linux
Desktop
2 years ago
Test name Executions per second
hasAttribute 3415805.5 Ops/sec
getAttribute 3342498.8 Ops/sec
classList 3157180.5 Ops/sec
hasAttribute single 3581388.5 Ops/sec
getAttribute single 3256677.5 Ops/sec
classList single 3804098.2 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single