Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0
Firefox 67
Ubuntu
Desktop
5 years ago
Test name Executions per second
getElementById 3550542.0 Ops/sec
getElementsByTagName 2538888.5 Ops/sec
querySelector 2594720.5 Ops/sec
getElementsByClassName 2403415.8 Ops/sec
getElementsByName 4391907.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName