Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.114 Safari/537.36
Chrome 89
Linux
Desktop
3 years ago
Test name Executions per second
querySelector 2608303.2 Ops/sec
querySelectorAll 1171980.4 Ops/sec
getElementsByClassName 3196550.0 Ops/sec
querySelector (ID) 1923013.1 Ops/sec
getElementsByID 3673073.2 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;