Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Chrome 102
Mac OS X 10.15.3
Desktop
2 years ago
Test name Executions per second
querySelector 2464948.0 Ops/sec
querySelectorAll 962953.3 Ops/sec
getElementsByClassName 2880826.0 Ops/sec
querySelector (ID) 1704962.9 Ops/sec
getElementsByID 2548633.8 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;