Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:65.0) Gecko/20100101 Firefox/65.0
Firefox 65
Mac OS X 10.14
Desktop
5 years ago
Test name Executions per second
getElementById 2523287.8 Ops/sec
getElementsByTagName 771277.2 Ops/sec
querySelector 794082.4 Ops/sec
getElementsByClassName 699539.5 Ops/sec
getElementsByName 1217152.9 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName