Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36
Chrome 77
Mac OS X 10.14.5
Desktop
5 years ago
Test name Executions per second
getElementById 5104043.5 Ops/sec
getElementsByTagName 1814791.0 Ops/sec
querySelector 1955856.8 Ops/sec
getElementsByClassName 1838174.6 Ops/sec
getElementsByName 2121521.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName


;