Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
getElementById 7697255.5 Ops/sec
querySelector 3637485.5 Ops/sec
getElementsByClassName 5762951.0 Ops/sec
querySelectorAll 2121160.8 Ops/sec
querySelector class 5487291.5 Ops/sec
HTML Preparation code:
Tests:
  • getElementById

  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector class