Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Chrome 130
Mac OS X 10.15.7
Desktop
2 months ago
Test name Executions per second
parent.children() 12658435.0 Ops/sec
parent.find("> *") 58774416.0 Ops/sec
parent.children(".child") 4600188.5 Ops/sec
parent.find("> .child") 57649436.0 Ops/sec
parent.children("span") 4289934.5 Ops/sec
parent.find("> span") 59190068.0 Ops/sec
parent.children("[data-attr=value]") 3131188.8 Ops/sec
parent.find("> [data-attr=value]") 59392000.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]")