Skip to content

Commit e83bd5c

Browse files
committed
sor path finding optimisations
Why this is faster - No recursion or repeated array copies in token-path search; we push/pop on a single shared path and visited set. - Incremental constraint tracking avoids O(len(path)) scans on each step. - Early stop based on approxPathsToReturn (as your comments suggest) keeps the search bounded. - Beam search on ranks uses cached per-edge limits to prune aggressively before running the expensive full-path limit calculation. - At most approxPathsToReturn full getLimitAmountSwapForPath evaluations per token path, instead of exploring all rank combinations.
1 parent 9492c85 commit e83bd5c

File tree

2 files changed

+709
-163
lines changed

2 files changed

+709
-163
lines changed

0 commit comments

Comments
 (0)