Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36
Chrome 100
Windows
Desktop
2 years ago
Test name Executions per second
parent.children() 11823350.0 Ops/sec
parent.find("> *") 42178400.0 Ops/sec
parent.children(".child") 2190037.8 Ops/sec
parent.find("> .child") 36158116.0 Ops/sec
parent.children("span") 2164560.2 Ops/sec
parent.find("> span") 37161216.0 Ops/sec
parent.children("[data-attr=value]") 1712444.4 Ops/sec
parent.find("> [data-attr=value]") 38178648.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]")