Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36
Chrome 113
Windows
Desktop
one year ago
Test name Executions per second
parent.children() 6611597.5 Ops/sec
parent.find("> *") 23699206.0 Ops/sec
parent.children(".child") 1787929.8 Ops/sec
parent.find("> .child") 21251708.0 Ops/sec
parent.children("span") 1554943.6 Ops/sec
parent.find("> span") 20269708.0 Ops/sec
parent.children("[data-attr=value]") 1198423.0 Ops/sec
parent.find("> [data-attr=value]") 20504092.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]")