Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.113 Safari/537.36
Chrome 81
Windows 7
Desktop
4 years ago
Test name Executions per second
getElementById 3830363.2 Ops/sec
getElementsByTagName 1448940.0 Ops/sec
querySelector 1863315.5 Ops/sec
getElementsByClassName 1693600.0 Ops/sec
getElementsByName 1887626.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName


;