Run details:
Mozilla/5.0 (Linux; Android 12; SM-G973U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Mobile Safari/537.36
Chrome Mobile 107
Android
Mobile
one year ago
Test name Executions per second
Traverse function 46234.8 Ops/sec
NodeIterator with filter function 3619.5 Ops/sec
NodeIterator with filter param 263907.7 Ops/sec
TreeWalker with filter function 9965.0 Ops/sec
TreeWalker with filter param 320114.8 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param