Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:71.0) Gecko/20100101 Firefox/71.0
Firefox 71
Mac OS X 10.15
Desktop
5 years ago
Test name Executions per second
getElementById 8481768.0 Ops/sec
getElementsByTagName 3806605.2 Ops/sec
querySelector 4932509.0 Ops/sec
getElementsByClassName 3937120.5 Ops/sec
getElementsByName 5338701.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName