Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Mobile Safari/537.36
Chrome Mobile 126
Android
Mobile
5 months ago
Test name Executions per second
Traverse function 57820.1 Ops/sec
NodeIterator with filter function 6891.4 Ops/sec
NodeIterator with filter param 183484.6 Ops/sec
TreeWalker with filter function 17799.5 Ops/sec
TreeWalker with filter param 217933.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