HTML Preparation code:
Script Preparation code:
Tests:
  • getElementsById + getElementsByClassName

  • querySelector + querySelector

  • querySelector

  • cache + getElementsByClassName

  • cache + querySelector

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    getElementsById + getElementsByClassName
    querySelector + querySelector
    querySelector
    cache + getElementsByClassName
    cache + querySelector

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Safari/537.36
Chrome 102 on Windows
View result in a separate tab
Test name Executions per second
getElementsById + getElementsByClassName 2167442.8 Ops/sec
querySelector + querySelector 1372145.2 Ops/sec
querySelector 1909224.9 Ops/sec
cache + getElementsByClassName 2477965.5 Ops/sec
cache + querySelector 2492925.0 Ops/sec