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

Add table showing complexity of methods for Input #10126

Merged
merged 2 commits into from
Mar 10, 2024

Conversation

ShadowMitia
Copy link
Contributor

@ShadowMitia ShadowMitia commented Oct 15, 2023

Objective

Fixes #10106

Adds a table showing computational complexity, as seen for Query (and similar to std::collections docs).

Solution

Add the complexity table


Changelog

  • Add complexity table for Input methods

@ShadowMitia
Copy link
Contributor Author

I've added information on all methods, hope this is ok.

I've tried analyzing the source and I've also used the std::collections doc on performance also as a reference.

I'm not completely sure on the values for just_pressed/just_released/pressed, which all have a call to contain.
I'm kind of assuming it is comparable to a get complexity as seen in the collections docs.

@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-Input Player input via keyboard, mouse, gamepad, and more labels Oct 16, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Nits on the wording, but nothing blocking. All of the listed time complexities appear correct to me.

@ShadowMitia
Copy link
Contributor Author

Updated with all suggestions and rebased on latest changes.
I still think the clear method should be documented as O(n), unless there is a good reason not to 😄
Should be good to go otherwise!

@james7132 james7132 requested a review from mockersf March 10, 2024 10:16
@james7132 james7132 added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 10, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Mar 10, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Mar 10, 2024
@james7132 james7132 added this pull request to the merge queue Mar 10, 2024
Merged via the queue into bevyengine:main with commit 1b3c2b0 Mar 10, 2024
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Input Player input via keyboard, mouse, gamepad, and more C-Docs An addition or correction to our documentation S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document computational complexity of bevy::input::Input
6 participants