Run details:
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36
Chrome 70
Windows 7
Desktop
5 years ago
Test name Executions per second
getElementById 4205845.5 Ops/sec
getElementsByTagName 1961440.9 Ops/sec
querySelector 2250037.8 Ops/sec
getElementsByClassName 1976222.9 Ops/sec
getElementsByName 2210978.8 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName


;