Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Firefox/60.0
Firefox 60
Mac OS X 10.13
Desktop
6 years ago
Test name Executions per second
getElementById 3912366.5 Ops/sec
getElementsByTagName 2105903.2 Ops/sec
querySelector 2211878.5 Ops/sec
getElementsByClassName 2004932.1 Ops/sec
getElementsByName 3171503.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName