Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36
Chrome 116
Mac OS X 10.15.7
Desktop
one year ago
Test name Executions per second
parent.children() 13744040.0 Ops/sec
parent.find("> *") 51366316.0 Ops/sec
parent.children(".child") 4322724.5 Ops/sec
parent.find("> .child") 52307400.0 Ops/sec
parent.children("span") 4073360.2 Ops/sec
parent.find("> span") 52157664.0 Ops/sec
parent.children("[data-attr=value]") 2806100.8 Ops/sec
parent.find("> [data-attr=value]") 52669976.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]")


;