Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36
Chrome 114
Windows
Desktop
one year ago
Test name Executions per second
hasAttribute 3889058.8 Ops/sec
getAttribute 3927705.8 Ops/sec
classList 3410504.0 Ops/sec
hasAttribute single 4562137.0 Ops/sec
getAttribute single 3942375.8 Ops/sec
classList single 1895212.6 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single


;