Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:62.0) Gecko/20100101 Firefox/62.0
Firefox 62
Mac OS X 10.12
Desktop
6 years ago
Test name Executions per second
getElementById 3269233.2 Ops/sec
getElementsByTagName 1470401.8 Ops/sec
querySelector 1695385.9 Ops/sec
getElementsByClassName 1418221.4 Ops/sec
getElementsByName 2588162.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName