Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.77 Safari/537.36 Edg/91.0.864.37
Chrome 91
Mac OS X 10.14.6
Desktop
3 years ago
Test name Executions per second
querySelector 2097191.2 Ops/sec
querySelectorAll 800520.8 Ops/sec
getElementsByClassName 2542711.8 Ops/sec
querySelector (ID) 1568331.0 Ops/sec
getElementsByID 1966405.0 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;