Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36
Chrome 105
Linux
Desktop
2 years ago
Test name Executions per second
parent.children() 5373241.0 Ops/sec
parent.find("> *") 22903356.0 Ops/sec
parent.children(".child") 1352137.0 Ops/sec
parent.find("> .child") 22224370.0 Ops/sec
parent.children("span") 1281625.8 Ops/sec
parent.find("> span") 22835838.0 Ops/sec
parent.children("[data-attr=value]") 995896.6 Ops/sec
parent.find("> [data-attr=value]") 26688498.0 Ops/sec
HTML Preparation code:
Script Preparation code:
Tests:
  • parent.children()

  • parent.find("> *")

  • parent.children(".child")

  • parent.find("> .child")

  • parent.children("span")

  • parent.find("> span")

  • parent.children("[data-attr=value]")

  • parent.find("> [data-attr=value]")


;