Run details:
Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36 OPR/70.0.3728.189
Opera 70
Windows 8.1
Desktop
4 years ago
Test name Executions per second
getElementById 3714271.2 Ops/sec
getElementsByTagName 884965.4 Ops/sec
querySelector 1652039.1 Ops/sec
getElementsByClassName 1331345.8 Ops/sec
getElementsByName 1426554.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName


;