Run details:
Mozilla/5.0 (Windows NT 6.1; rv:91.0) Gecko/20100101 Firefox/91.0
Firefox 91
Windows 7
Desktop
2 years ago
Test name Executions per second
querySelector 1247239.5 Ops/sec
querySelectorAll 514041.6 Ops/sec
getElementsByClassName 2038023.1 Ops/sec
querySelector (ID) 1201398.0 Ops/sec
getElementsByID 2035437.9 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;