Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Mobile Safari/537.36
Chrome Mobile 127
Android
Mobile
4 months ago
Test name Executions per second
Traverse function 110529.3 Ops/sec
NodeIterator with filter function 32040.4 Ops/sec
NodeIterator with filter param 699561.2 Ops/sec
TreeWalker with filter function 81963.0 Ops/sec
TreeWalker with filter param 871838.2 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param