Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Mobile Safari/537.36
Chrome Mobile 129
Android
Mobile
2 months ago
Test name Executions per second
Traverse function 120046.5 Ops/sec
NodeIterator with filter function 31571.9 Ops/sec
NodeIterator with filter param 743643.1 Ops/sec
TreeWalker with filter function 67925.3 Ops/sec
TreeWalker with filter param 879976.1 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param