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 2160351.2 Ops/sec
getElementsByTagName 1216194.4 Ops/sec
querySelector 1911241.9 Ops/sec
getElementsByClassName 1569094.0 Ops/sec
getElementsByName 1769015.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName