Run details:
Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0
Firefox 118
Linux
Desktop
one year ago
Test name Executions per second
Traverse function 168133.6 Ops/sec
NodeIterator with filter function 47321.9 Ops/sec
NodeIterator with filter param 595378.2 Ops/sec
TreeWalker with filter function 98542.1 Ops/sec
TreeWalker with filter param 251023.0 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param