Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Mobile Safari/537.36
Chrome Mobile 128
Android
Mobile
2 months ago
Test name Executions per second
Traverse function 85377.5 Ops/sec
NodeIterator with filter function 21655.0 Ops/sec
NodeIterator with filter param 560793.4 Ops/sec
TreeWalker with filter function 59193.5 Ops/sec
TreeWalker with filter param 663071.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