Run details:
Mozilla/5.0 (Linux; Android 10; SM-G970F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Mobile Safari/537.36
Chrome Mobile 80
Android
Mobile
4 years ago
Test name Executions per second
Traverse function 30531.1 Ops/sec
NodeIterator with filter function 6647.0 Ops/sec
NodeIterator with filter param 166911.0 Ops/sec
TreeWalker with filter function 17603.6 Ops/sec
TreeWalker with filter param 219400.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