Run details:
Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) EdgiOS/115.0.1901.203 Version/16.0 Mobile/15E148 Safari/604.1
Mobile Safari 16
iOS 16.6
Mobile
one year ago
Test name Executions per second
Traverse function 223100.3 Ops/sec
NodeIterator with filter function 82300.1 Ops/sec
NodeIterator with filter param 1459383.5 Ops/sec
TreeWalker with filter function 212258.6 Ops/sec
TreeWalker with filter param 1606905.4 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param