Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 11_1_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.101 Safari/537.36
Chrome 87
Mac OS X 11.1.0
Desktop
3 years ago
Test name Executions per second
querySelector 3803390.0 Ops/sec
querySelectorAll 1394717.4 Ops/sec
getElementsByClassName 4792085.0 Ops/sec
querySelector (ID) 2743895.5 Ops/sec
getElementsByID 3652255.0 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;