Run details:
Mozilla/5.0 (Android 14; Mobile; rv:124.0) Gecko/124.0 Firefox/124.0
Firefox Mobile 124
Android
Mobile
8 months ago
Test name Executions per second
Traverse function 334108.2 Ops/sec
NodeIterator with filter function 50425.4 Ops/sec
NodeIterator with filter param 794407.4 Ops/sec
TreeWalker with filter function 119608.9 Ops/sec
TreeWalker with filter param 667857.8 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param