Run details:
Mozilla/5.0 (Windows NT 10.0; rv:109.0) Gecko/20100101 Firefox/118.0
Firefox 118
Windows
Desktop
one year ago
Test name Executions per second
hasAttribute 8166571.0 Ops/sec
getAttribute 5230540.5 Ops/sec
classList 5859587.0 Ops/sec
hasAttribute single 7580478.5 Ops/sec
getAttribute single 5309012.5 Ops/sec
classList single 5677384.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single