Run details:
Mozilla/5.0 (X11; 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 4103670.5 Ops/sec
getElementsByTagName 1630058.0 Ops/sec
querySelector 1755313.0 Ops/sec
getElementsByClassName 1661618.8 Ops/sec
getElementsByName 1749792.4 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName