Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.81 Safari/537.36
Chrome 94
Mac OS X 10.11.6
Desktop
3 years ago
Test name Executions per second
hasAttribute 1899526.4 Ops/sec
getAttribute 1848381.1 Ops/sec
classList 1842738.9 Ops/sec
hasAttribute single 2145836.8 Ops/sec
getAttribute single 1917051.8 Ops/sec
classList single 2354241.5 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single