Skip to content

Conversation

sutatoruta
Copy link
Contributor

@sutatoruta sutatoruta commented May 25, 2025

Reference issue

resolves #817

What does this implement/fix?

Building on #817, this PR improves both performance and readability by using sets for obstacle management in DStarLite.

This change reduces the computational complexity of is_obstacle from O(n) to O(1) average with respect to the number of obstacles. On my local environment, test execution time was improved from 1.72 seconds to 0.82 seconds.
While the suggested improvement in the original issue used dictionaries, I opted for sets to achieve both greater efficiency and more concise code.

Additional information

CheckList

  • Did you add an unittest for your new example or defect fix?
  • Did you add documents for your new example?
  • All CIs are green? (You can check it after submitting)

Copy link
Owner

@AtsushiSakai AtsushiSakai left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!!

@AtsushiSakai AtsushiSakai merged commit 4ffd8e7 into AtsushiSakai:master Jun 7, 2025
8 checks passed
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.

How to speed up DStarLite algorithm implementation (improvement)

2 participants