HTML Preparation code:
Tests:
  • getElementById()

  • getElementsByClassName()

  • getElementsByTagName()

  • querySelector(#id)

  • querySelector(.id)

  • querySelectorAll(#id)

  • querySelectorAll(.id)

  • umbrella(#id)

  • umbrella(.id)

  • umbrella(tag#id)

  • umbrella(tag.id)

  • umbrella + getElementById

  • umbrella + getElementsByClassName

  • umbrella + querySelectorAll

  • querySelectorAll in function

Rendered benchmark preparation results:

Suite status: <idle, ready to run>

Previous results
  • Test case name Result
    getElementById()
    getElementsByClassName()
    getElementsByTagName()
    querySelector(#id)
    querySelector(.id)
    querySelectorAll(#id)
    querySelectorAll(.id)
    umbrella(#id)
    umbrella(.id)
    umbrella(tag#id)
    umbrella(tag.id)
    umbrella + getElementById
    umbrella + getElementsByClassName
    umbrella + querySelectorAll
    querySelectorAll in function

    Fastest: N/A

    Slowest: N/A

Latest run results:
Run details: (Test run date: 2 years ago)
Mozilla/5.0 (Linux; Android 12; SAMSUNG SM-A715F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/18.0 Chrome/99.0.4844.88 Mobile Safari/537.36
Chrome Mobile 99 on Android
View result in a separate tab
Test name Executions per second
getElementById() 1121478.2 Ops/sec
getElementsByClassName() 907700.4 Ops/sec
getElementsByTagName() 826828.8 Ops/sec
querySelector(#id) 683199.5 Ops/sec
querySelector(.id) 1299537.5 Ops/sec
querySelectorAll(#id) 363322.0 Ops/sec
querySelectorAll(.id) 569824.2 Ops/sec
umbrella(#id) 144484.6 Ops/sec
umbrella(.id) 157129.8 Ops/sec
umbrella(tag#id) 140512.9 Ops/sec
umbrella(tag.id) 151993.4 Ops/sec
umbrella + getElementById 340174.9 Ops/sec
umbrella + getElementsByClassName 193390.5 Ops/sec
umbrella + querySelectorAll 179337.4 Ops/sec
querySelectorAll in function 557181.1 Ops/sec


;