Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:132.0) Gecko/20100101 Firefox/132.0
Firefox 132
Linux
Desktop
one month ago
Test name Executions per second
Traverse function 377078.0 Ops/sec
NodeIterator with filter function 46924.0 Ops/sec
NodeIterator with filter param 596876.4 Ops/sec
TreeWalker with filter function 117516.1 Ops/sec
TreeWalker with filter param 563158.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