Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Mac OS X 10.15
Desktop
2 months ago
Test name Executions per second
parent.children() 16696999.0 Ops/sec
parent.find("> *") 69894824.0 Ops/sec
parent.children(".child") 6301780.0 Ops/sec
parent.find("> .child") 69726312.0 Ops/sec
parent.children("span") 6250174.5 Ops/sec
parent.find("> span") 69163272.0 Ops/sec
parent.children("[data-attr=value]") 4956735.5 Ops/sec
parent.find("> [data-attr=value]") 69077400.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]")