Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36
Chrome 117
Windows
Desktop
one year ago
Test name Executions per second
parent.children() 4471915.0 Ops/sec
parent.find("> *") 23866396.0 Ops/sec
parent.children(".child") 1606432.0 Ops/sec
parent.find("> .child") 23764864.0 Ops/sec
parent.children("span") 1437178.4 Ops/sec
parent.find("> span") 24077598.0 Ops/sec
parent.children("[data-attr=value]") 1173295.4 Ops/sec
parent.find("> [data-attr=value]") 24383696.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]")