Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36
Chrome 90
Linux
Desktop
2 years ago
Test name Executions per second
hasAttribute 1841316.0 Ops/sec
getAttribute 1858583.0 Ops/sec
classList 1749501.4 Ops/sec
hasAttribute single 2101324.0 Ops/sec
getAttribute single 1802609.2 Ops/sec
classList single 2322066.2 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single