Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.104 Safari/537.36
Chrome 88
Windows 7
Desktop
3 years ago
Test name Executions per second
getElementById 3914485.8 Ops/sec
getElementsByTagName 1754095.6 Ops/sec
querySelector 2428014.5 Ops/sec
getElementsByClassName 2235543.8 Ops/sec
getElementsByName 2511495.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName