Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.69 Safari/537.36
Chrome 95
Windows
Desktop
3 years ago
Test name Executions per second
querySelector 1593475.6 Ops/sec
querySelectorAll 686394.5 Ops/sec
getElementsByClassName 1984284.8 Ops/sec
querySelector (ID) 1176010.0 Ops/sec
getElementsByID 1586515.5 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;