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
getElementById 1659447.2 Ops/sec
querySelector 978098.1 Ops/sec
getElementsByClassName 1342696.9 Ops/sec
querySelectorAll 647383.5 Ops/sec
querySelector class 1380614.2 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class


;