Run details:
Mozilla/5.0 (Linux; Android 9; SM-A202F) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.62 Mobile Safari/537.36
Chrome Mobile 78
Android
Mobile
5 years ago
Test name Executions per second
Traverse function 20361.4 Ops/sec
NodeIterator with filter function 4318.0 Ops/sec
NodeIterator with filter param 124076.1 Ops/sec
TreeWalker with filter function 11656.2 Ops/sec
TreeWalker with filter param 149704.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