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

Make a note of the algorithmic complexity of each of the query operations #4742

Closed
alice-i-cecile opened this issue May 14, 2022 · 2 comments
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation

Comments

@alice-i-cecile
Copy link
Member

alice-i-cecile commented May 14, 2022

How can Bevy's documentation be improved?

This question comes up pretty regularly. I would like to see this described for:

  • archetypal filters: O(a)
  • change detection filters: O(a + n)
  • ordinary iteration: O(n)
  • iter_combinations: ???
  • get and get_mut: O(1)
  • get_multiple: O(k)
  • get_multiple_mut: O(k^2)
@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-ECS Entities, components, systems, and events labels May 14, 2022
@Nilirad
Copy link
Contributor

Nilirad commented May 20, 2022

I would like to take this. I'm currently working on improving Query and WorldQuery docs, and I think this data fits very well into a table under a “Performance” section at the bottom of Query docs.

@james7132
Copy link
Member

Adding one more to that: single and get_single is O(a)

@Nilirad Nilirad mentioned this issue Jun 11, 2022
2 tasks
@bors bors bot closed this as completed in 7511c9b Sep 2, 2022
james7132 pushed a commit to james7132/bevy that referenced this issue Oct 28, 2022
# Objective

- Update `Query` docs with better terminology
- add some performance remarks (Fixes bevyengine#4742)

## Solution

- See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` struct docs.
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective

- Update `Query` docs with better terminology
- add some performance remarks (Fixes bevyengine#4742)

## Solution

- See bevyengine#4989. This PR is derived from it. It just includes changes to the `Query` struct docs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Docs An addition or correction to our documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants