Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.106 Safari/537.36
Chrome 83
Mac OS X 10.15.2
Desktop
3 years ago
Test name Executions per second
getElementById 2616356.5 Ops/sec
getElementsByTagName 1060199.6 Ops/sec
querySelector 1365562.4 Ops/sec
getElementsByClassName 798773.1 Ops/sec
getElementsByName 595637.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName