Run details:
Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Mobile Safari/537.36
Chrome Mobile 118
Android
Mobile
one year ago
Test name Executions per second
Traverse function 55252.1 Ops/sec
NodeIterator with filter function 5182.3 Ops/sec
NodeIterator with filter param 135853.9 Ops/sec
TreeWalker with filter function 14322.1 Ops/sec
TreeWalker with filter param 206715.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