Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.122 Safari/537.36
Chrome 81
Mac OS X 10.15.2
Desktop
4 years ago
Test name Executions per second
getElementById 5311884.5 Ops/sec
getElementsByTagName 1937140.1 Ops/sec
querySelector 2491210.2 Ops/sec
getElementsByClassName 2295095.8 Ops/sec
getElementsByName 2626979.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName