Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36
Chrome 81
Linux
Desktop
4 years ago
Test name Executions per second
querySelector 4045428.2 Ops/sec
querySelectorAll 1597661.4 Ops/sec
getElementsByClassName 4963446.5 Ops/sec
querySelector (ID) 2946924.2 Ops/sec
getElementsByID 3971516.2 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;