HTML Preparation code:
Tests:
  • querySelector

  • getElementsByClassName

  • querySelectorAll

  • querySelector (attribute)

  • querySelectorAll (attribute)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    querySelector
    getElementsByClassName
    querySelectorAll
    querySelector (attribute)
    querySelectorAll (attribute)

    Fastest: N/A

    Slowest: N/A

Get performance results from real users on your website with Request Metrics.
Latest run results:
Run details: (Test run date: 19 days ago)
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.54 Safari/537.36
Chrome 94 on Mac OS X 10.15.7
View result in a separate tab
Test name Executions per second
querySelector 4016230.0 Ops/sec
getElementsByClassName 4973939.0 Ops/sec
querySelectorAll 1803766.0 Ops/sec
querySelector (attribute) 2139794.0 Ops/sec
querySelectorAll (attribute) 1041918.0 Ops/sec