Run details:
Mozilla/5.0 (X11; CrOS x86_64 14909.100.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36
Chrome 104
Chrome OS 14909.100.0
Desktop
2 years ago
Test name Executions per second
parent.children() 2157397.8 Ops/sec
parent.find("> *") 8080590.0 Ops/sec
parent.children(".child") 530377.5 Ops/sec
parent.find("> .child") 7999070.0 Ops/sec
parent.children("span") 487884.8 Ops/sec
parent.find("> span") 8216640.0 Ops/sec
parent.children("[data-attr=value]") 383010.6 Ops/sec
parent.find("> [data-attr=value]") 8478372.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]")


;