Skip to content
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

Refactor getClosestNeighbour #275

Closed
wants to merge 1 commit into from

Conversation

jtaveau
Copy link

@jtaveau jtaveau commented Feb 11, 2024

I took the initiative to refactor this function as it's the most expensive one of the project (computationnally speaking).
The results looked great on hotspot, but I had only a small bag of 15s to test it, would you have a bigger one?

Before refactor:
Screenshot from 2024-02-11 13-26-14

After refactor:
Screenshot from 2024-02-11 13-08-32

@nachovizzo
Copy link
Collaborator

@jtaveau thanks a lot for the initiative. Indeed the hot path from the code is looking for nearest neighbors. As it has been the case for most systems out there as well

I'll review the code and test this intensively, with all the datasets we know were it's working and come back to you. It might take some time only

PS: thanks for fixing the typos 😂

Copy link
Collaborator

@nachovizzo nachovizzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I tried on a few datasets and it's working, although I do not see any real improvement in terms of speed.

I think I prefer the other implementation since the 3 tasks that the lambda function is doing where defined in 3 different steps. With this implementation they all tree tasks got merged into quite a few nested loops, which complicates redability for new users

I will let Tiziano and Benedikt comment and test on this particular PR

Great job @jtaveau

cpp/kiss_icp/core/VoxelHashMap.cpp Show resolved Hide resolved
@nachovizzo
Copy link
Collaborator

Closing this to avoid stalling, feel free to re-open when you manage to benchmark it!

Best!

@nachovizzo nachovizzo closed this Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants