Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36
Chrome 110
Linux
Desktop
one year ago
Test name Executions per second
className.indexOf before remove 3255843.0 Ops/sec
classList.contains before remove 911351.8 Ops/sec
classList.remove without checking 1071766.4 Ops/sec
className splice 1227545.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • className.indexOf before remove

  • classList.contains before remove

  • classList.remove without checking

  • className splice


;