Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Chrome 127
Windows
Desktop
3 months ago
Test name Executions per second
parent.children() 13671468.0 Ops/sec
parent.find("> *") 62647412.0 Ops/sec
parent.children(".child") 4130143.2 Ops/sec
parent.find("> .child") 61396668.0 Ops/sec
parent.children("span") 3711923.5 Ops/sec
parent.find("> span") 60968428.0 Ops/sec
parent.children("[data-attr=value]") 3397561.5 Ops/sec
parent.find("> [data-attr=value]") 60819388.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]")