Run details:
Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
IE 11
Windows 7
Desktop
3 years ago
Test name Executions per second
Traverse function 216183.9 Ops/sec
NodeIterator with filter function 56445.1 Ops/sec
NodeIterator with filter param 589622.6 Ops/sec
TreeWalker with filter function 136078.6 Ops/sec
TreeWalker with filter param 442067.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