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

Slight Improvement in runtime for #2473 #2475

Merged
merged 2 commits into from
Jul 12, 2024

Conversation

arjo129
Copy link
Contributor

@arjo129 arjo129 commented Jul 12, 2024

🦟 Bug fix

Fixes #

Summary

This PR is a suggestion for how #2473 can run in O(m+n) time instead of O(mn) where m is number of entities removed and n is number of systems.

Compared to main: main...arjo/suggestion/2473

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸🔸

This PR is a suggestion for how 2473 can run in O(m+n) time instead of
O(mn) where m is number of entities removed and n is number of systems.

Signed-off-by: Arjo Chakravarty <arjoc@google.com>
Signed-off-by: Arjo Chakravarty <arjoc@google.com>
Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

FWIW, for the number of entities and plugins we're dealing with, a std::vector is likely to have the same or better performance than a std::unordered_set, but I don't want to delay this any further.

@azeey azeey merged commit f02bd1e into azeey/suggestion_2232 Jul 12, 2024
6 checks passed
@azeey azeey deleted the arjo/suggestion/2473 branch July 12, 2024 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants