Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36
Chrome 77
Mac OS X 10.13.3
Desktop
5 years ago
Test name Executions per second
getElementById 5794119.5 Ops/sec
getElementsByTagName 2442411.0 Ops/sec
querySelector 2629885.0 Ops/sec
getElementsByClassName 2484493.2 Ops/sec
getElementsByName 2592862.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName