Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/114.0
Firefox 114
Mac OS X 10.15
Desktop
one year ago
Test name Executions per second
Traverse function 166854.4 Ops/sec
NodeIterator with filter function 38552.2 Ops/sec
NodeIterator with filter param 486691.6 Ops/sec
TreeWalker with filter function 106768.6 Ops/sec
TreeWalker with filter param 329496.6 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param