-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Fix and optimize findPathFurthestReachedPoint #5698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Tony Najjar <[email protected]>
|
@tonynajjar, your PR has failed to build. Please check CI outputs and resolve issues. |
|
I would like some computational analysis here before merging. But as you can imagine, I have no obvious complaints about the code changes in it of itself |
|
@tonynajjar was there a ticket / discussion for this that we should link / close when merged? @mini-1235 is going to do the perf testing shortly |
|
I don't think so no |
|
@claude can you write a unit test that demonstrates the original implementation is incorrect? |
1 similar comment
|
@claude can you write a unit test that demonstrates the original implementation is incorrect? |
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
Oh I see, this doesn't work with PRs on forks. I mostly use Claude in tickets. You could just locally give it this PR URL and it should be able to provide you something using MCP |
|
I tested this today over 100 iterations. The original implementation takes ~45 ms, while this PR takes ~65 ms |
|
Yeah, that is very non-trivial. Maybe this can be vectorized better with Eigen functions? Or perhaps we can set a maximum it can look backwards from that is 'reasonable' for any single point to need to go back to (i.e. we know the dt/trajectories, we should be able to find the maximum in reverse a given sample can go to bound the lower check) Not tested or really reviewed in detail, but this is something that Claude Code is pretty good at in general. I asked it to vectorize using Eigen APIs and it seems plausible. The |
This actually makes it even slower, around 130ms :( Actually, I try computing dx, dy, and the distances on the fly instead, and it only takes ~40ms. I will open a PR, let me know if that sounds good to you |
|
#5792 supersedes |
Basic Info
Description of contribution in a few bullet points
Description of documentation updates required from your changes
Description of how this change was tested
Future work that may be required in bullet points
For Maintainers:
backport-*.