Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:76.0) Gecko/20100101 Firefox/76.0
Firefox 76
Mac OS X 10.11
Desktop
4 years ago
Test name Executions per second
getElementById 5887216.5 Ops/sec
getElementsByTagName 2929415.8 Ops/sec
querySelector 3009822.8 Ops/sec
getElementsByClassName 2815467.0 Ops/sec
getElementsByName 3594878.5 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • getElementById

  • getElementsByTagName

  • querySelector

  • getElementsByClassName

  • getElementsByName