Run details:
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/117.0
Firefox 117
Ubuntu
Desktop
one year ago
Test name Executions per second
Traverse function 208390.5 Ops/sec
NodeIterator with filter function 57561.5 Ops/sec
NodeIterator with filter param 704971.1 Ops/sec
TreeWalker with filter function 135317.3 Ops/sec
TreeWalker with filter param 469508.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