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 7722356.5 Ops/sec
querySelector 3465446.2 Ops/sec
getElementsByClassName 6610380.0 Ops/sec
querySelectorAll 2745637.5 Ops/sec
querySelector class 4065802.0 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class