Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Chrome 119
Windows
Desktop
one year ago
Test name Executions per second
parent.children() 10852202.0 Ops/sec
parent.find("> *") 51042860.0 Ops/sec
parent.children(".child") 2801354.2 Ops/sec
parent.find("> .child") 51530184.0 Ops/sec
parent.children("span") 2633558.5 Ops/sec
parent.find("> span") 50694572.0 Ops/sec
parent.children("[data-attr=value]") 2269653.2 Ops/sec
parent.find("> [data-attr=value]") 50836760.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]")