Run details:
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Firefox 134
Windows
Desktop
one month ago
Test name Executions per second
Traverse function 405008.8 Ops/sec
NodeIterator with filter function 64253.5 Ops/sec
NodeIterator with filter param 939112.4 Ops/sec
TreeWalker with filter function 156561.2 Ops/sec
TreeWalker with filter param 652726.1 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param