Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:88.0) Gecko/20100101 Firefox/88.0
Firefox 88
Mac OS X 10.15
Desktop
3 years ago
Test name Executions per second
hasAttribute 7301687.5 Ops/sec
getAttribute 5216990.5 Ops/sec
classList 5721798.5 Ops/sec
hasAttribute single 7302718.0 Ops/sec
getAttribute single 5309982.5 Ops/sec
classList single 5542228.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single