Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
hasAttribute 1935847.9 Ops/sec
getAttribute 1913450.4 Ops/sec
classList 1831506.4 Ops/sec
hasAttribute single 2598090.0 Ops/sec
getAttribute single 1802454.2 Ops/sec
classList single 1904979.9 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single