Run details:
Mozilla/5.0 (Linux; Android 11; BE2029) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Mobile Safari/537.36
Chrome Mobile 105
Android
Mobile
2 years ago
Test name Executions per second
Traverse function 9919.6 Ops/sec
NodeIterator with filter function 970.4 Ops/sec
NodeIterator with filter param 71932.2 Ops/sec
TreeWalker with filter function 3000.6 Ops/sec
TreeWalker with filter param 77385.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