Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/116.0
Firefox 116
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
Traverse function 203285.7 Ops/sec
NodeIterator with filter function 46306.5 Ops/sec
NodeIterator with filter param 670806.1 Ops/sec
TreeWalker with filter function 113015.8 Ops/sec
TreeWalker with filter param 434564.7 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param