Run details:
Mozilla/5.0 (X11; Fedora; Fedora; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.86 Safari/537.36
Chrome 73
Fedora
Desktop
5 years ago
Test name Executions per second
getElementById 4012266.2 Ops/sec
getElementsByTagName 1394459.0 Ops/sec
querySelector 1551209.0 Ops/sec
getElementsByClassName 1352148.0 Ops/sec
getElementsByName 1560093.6 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName