Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:83.0) Gecko/20100101 Firefox/83.0
Firefox 83
Ubuntu
Desktop
one year ago
Test name Executions per second
hasAttribute 4363983.5 Ops/sec
getAttribute 3306772.2 Ops/sec
classList 3991747.0 Ops/sec
hasAttribute single 4491563.5 Ops/sec
getAttribute single 3477320.5 Ops/sec
classList single 3806671.0 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single