addFunction vs classList

3 years ago
User agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
Test name Executions per second
addClass function 426.4 Ops/sec
classList 2794.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • addClass function

  • classList

Open this result on MeasureThat.net