Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
Chrome 68
Linux
Desktop
6 years ago
Test name Executions per second
getElementById 6701281.0 Ops/sec
getElementsByTagName 2784632.5 Ops/sec
querySelector 2916327.2 Ops/sec
getElementsByClassName 2734637.8 Ops/sec
getElementsByName 3070420.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName