You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments