Run details:
Mozilla/5.0 (Linux; Android 12; CPH1919) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.6261.149 Mobile Safari/537.36 OPR/81.3.4292.78688
Opera Mobile 81
Android
Mobile
8 months ago
Test name Executions per second
Traverse function 55803.1 Ops/sec
NodeIterator with filter function 7146.3 Ops/sec
NodeIterator with filter param 334513.4 Ops/sec
TreeWalker with filter function 19955.4 Ops/sec
TreeWalker with filter param 367280.1 Ops/sec
Script Preparation code:
Tests:
  • Traverse function

  • NodeIterator with filter function

  • NodeIterator with filter param

  • TreeWalker with filter function

  • TreeWalker with filter param