Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/110.0
Firefox 110
Ubuntu
Desktop
one year ago
Test name Executions per second
parent.children() 3800642.2 Ops/sec
parent.find("> *") 13456138.0 Ops/sec
parent.children(".child") 1249505.6 Ops/sec
parent.find("> .child") 9896014.0 Ops/sec
parent.children("span") 1173183.2 Ops/sec
parent.find("> span") 21599420.0 Ops/sec
parent.children("[data-attr=value]") 1436047.1 Ops/sec
parent.find("> [data-attr=value]") 21255190.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]")


;