Run details:
Mozilla/5.0 (Linux; Android 7.0; SM-T819) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36
Chrome 107
Android 7.0
Tablet
one year ago
Test name Executions per second
Traverse function 15191.5 Ops/sec
NodeIterator with filter function 1392.9 Ops/sec
NodeIterator with filter param 111181.7 Ops/sec
TreeWalker with filter function 3785.5 Ops/sec
TreeWalker with filter param 109126.3 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param