Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Firefox/78.0
Firefox 78
Mac OS X 10.14
Desktop
3 years ago
Test name Executions per second
getElementById 9737553.0 Ops/sec
getElementsByTagName 4900635.0 Ops/sec
querySelector 5577395.5 Ops/sec
getElementsByClassName 4736002.5 Ops/sec
getElementsByName 6090861.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName