Run details:
Mozilla/5.0 (Linux; Android 8.1.0; BBD100-1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.0.0 Mobile Safari/537.36
Chrome Mobile 102
Android 8.1.0
Mobile
2 years ago
Test name Executions per second
Traverse function 10989.2 Ops/sec
NodeIterator with filter function 1287.9 Ops/sec
NodeIterator with filter param 73663.5 Ops/sec
TreeWalker with filter function 3547.4 Ops/sec
TreeWalker with filter param 80388.9 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param