Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Chrome 49
Mac OS X 10.8.5
Desktop
3 years ago
Test name Executions per second
hasAttribute 1156049.4 Ops/sec
getAttribute 1014310.4 Ops/sec
classList 1016870.6 Ops/sec
hasAttribute single 945241.0 Ops/sec
getAttribute single 1031744.9 Ops/sec
classList single 1023548.6 Ops/sec
HTML Preparation code:
Tests:
  • hasAttribute

  • getAttribute

  • classList

  • hasAttribute single

  • getAttribute single

  • classList single