Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Mac OS X 10.14
Desktop
5 years ago
Test name Executions per second
getElementById 7547654.0 Ops/sec
getElementsByTagName 4266062.5 Ops/sec
querySelector 4684232.0 Ops/sec
getElementsByClassName 3924698.0 Ops/sec
getElementsByName 5222717.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName