Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.75 Safari/537.36
Chrome 73
Mac OS X 10.13.6
Desktop
5 years ago
Test name Executions per second
getElementById 6113803.5 Ops/sec
getElementsByTagName 2595158.0 Ops/sec
querySelector 2925454.0 Ops/sec
getElementsByClassName 2650487.8 Ops/sec
getElementsByName 2928950.2 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName


;