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

Hashmap instead of a linear search issue number is #1074 #1110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Mritunjaii
Copy link

Improve Performance #1074
https://github.com/AtsushiSakai/PythonRobotics/blob/ad600cd9023e67cd8064b678213d6586d076dd15/PathPlanning/AStar/a_star_searching_from_two_side.py#L80C1-L117C20

In the referenced function, the search for coordinates and neighbors in ob_list and neighbors occurs frequently, especially for long obstacles. This change optimizes the process by storing obstacles and neighbors in a set. Sets use a hashmap for lookups, significantly improving efficiency compared to linear search. This modification aims to enhance performance in scenarios with long obstacle lists by reducing the time complexity of lookups

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.

1 participant