Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.125 Safari/537.36
Chrome 84
Windows
Desktop
4 years ago
Test name Executions per second
querySelector 3295563.0 Ops/sec
querySelectorAll 1462679.0 Ops/sec
getElementsByClassName 3707816.0 Ops/sec
querySelector (ID) 2329776.0 Ops/sec
getElementsByID 2924318.0 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;