Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 13_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.1 Mobile/15E148 Safari/604.1
Mobile Safari 13
iOS 13.1
Mobile
4 years ago
Test name Executions per second
querySelector 4858125.0 Ops/sec
querySelectorAll 3186030.5 Ops/sec
getElementsByClassName 5920438.5 Ops/sec
querySelector (ID) 4524145.0 Ops/sec
getElementsByID 6706219.0 Ops/sec
HTML Preparation code:
Tests:
  • querySelector

  • querySelectorAll

  • getElementsByClassName

  • querySelector (ID)

  • getElementsByID


;