Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3657.0 Safari/537.36
Chrome 73
Mac OS X 10.14.2
Desktop
5 years ago
Test name Executions per second
getElementById 3711439.8 Ops/sec
getElementsByTagName 1651005.9 Ops/sec
querySelector 1853088.1 Ops/sec
getElementsByClassName 1620949.1 Ops/sec
getElementsByName 1737908.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName