HTML Preparation code:
Script Preparation code:
Tests:
  • querySelector (id)

  • querySelectorAll (id)

  • querySelector (class)

  • querySelectorAll (class)

  • getElementById

  • getElementsByClassName

  • jQuery (id)

  • jQuery (class)

  • Custom (id)

  • Custom (class)

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    querySelector (id)
    querySelectorAll (id)
    querySelector (class)
    querySelectorAll (class)
    getElementById
    getElementsByClassName
    jQuery (id)
    jQuery (class)
    Custom (id)
    Custom (class)

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 5 years ago)
Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/73.0.3683.103 Safari/537.36
Chrome 73 on Windows 7
View result in a separate tab
Test name Executions per second
querySelector (id) 423528.2 Ops/sec
querySelectorAll (id) 199227.4 Ops/sec
querySelector (class) 484108.2 Ops/sec
querySelectorAll (class) 177192.0 Ops/sec
getElementById 627490.2 Ops/sec
getElementsByClassName 726905.5 Ops/sec
jQuery (id) 371737.8 Ops/sec
jQuery (class) 92693.4 Ops/sec
Custom (id) 765958.6 Ops/sec
Custom (class) 761744.6 Ops/sec


;