Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 17_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/122.0.6261.89 Mobile/15E148 Safari/604.1
Chrome Mobile iOS 122
iOS 17.3
Mobile
9 months ago
Test name Executions per second
getElementById 7738753.0 Ops/sec
querySelector 3510498.2 Ops/sec
getElementsByClassName 6595062.5 Ops/sec
querySelectorAll 2778359.8 Ops/sec
querySelector class 4069143.2 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class