Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:100.0) Gecko/20100101 Firefox/100.0
Firefox 100
Linux
Desktop
one year ago
Test name Executions per second
hasAttribute 3490089.0 Ops/sec
getAttribute 2592476.0 Ops/sec
classList 3131852.8 Ops/sec
hasAttribute single 3576591.8 Ops/sec
getAttribute single 2558419.5 Ops/sec
classList single 3136568.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single