Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Chrome 84
Linux
Desktop
4 years ago
Test name Executions per second
querySelector 3114421.2 Ops/sec
querySelectorAll 1139476.8 Ops/sec
getElementsByClassName 3861272.2 Ops/sec
querySelector (ID) 2373625.0 Ops/sec
getElementsByID 2710178.0 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;