Run details:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36
Chrome 98
Linux
Desktop
2 years ago
Test name Executions per second
parent.children() 6524248.5 Ops/sec
parent.find("> *") 30235826.0 Ops/sec
parent.children(".child") 1975041.8 Ops/sec
parent.find("> .child") 31525312.0 Ops/sec
parent.children("span") 1960603.4 Ops/sec
parent.find("> span") 30442768.0 Ops/sec
parent.children("[data-attr=value]") 1579418.9 Ops/sec
parent.find("> [data-attr=value]") 31004992.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]")