-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
adding time complexity for partition_in_place iter method #85315
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @yaahc (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Hey @satylogin, thank you for the PR! I agree that documenting our algorithms time complexity is a great idea but I want to be careful to make sure we show it in a way that doesn't imply that we're making any sort of stable guarantee that would prevent us from changing the complexity of the implementation in the future. We already have a similar section for I think it might be as simple as adding a "# Current Implementation" header before the time complexity line you added. Though, it might be nice to also add an explanation about how the current implementation works, but I'll leave adding that up to your discretion. |
Hi @yaahc I agree with all the comments and specially like the idea of maintaining consistency across docs as well the idea of bounding complexity to current implementation. Let me raise another revision with the modifications |
…ounding complexity to current implementation
Hi @yaahc, I have updated the revision with algo explanation and put the info in the dedicated current implementation section. |
Awesome, thank you. @bors r+ |
📌 Commit 85e4177 has been approved by |
@bors rollup=always |
Rollup of 8 pull requests Successful merges: - rust-lang#84717 (impl FromStr for proc_macro::Literal) - rust-lang#85169 (Add method-toggle to <details> for methods) - rust-lang#85287 (Expose `Concurrent` (private type in public i'face)) - rust-lang#85315 (adding time complexity for partition_in_place iter method) - rust-lang#85439 (Add diagnostic item to `CStr`) - rust-lang#85464 (Fix UB in documented example for `ptr::swap`) - rust-lang#85470 (Fix invalid CSS rules for a:hover) - rust-lang#85472 (CTFE Machine: do not expose Allocation) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
I feel that one thing missing from rust docs compared to cpp references is existence of time complexity for all methods and functions. While it would be humongous task to include it for everything in single go, it is still doable if we as community keep on adding it in relevant places as and when we find them.
This PR adds the time complexity for partition_in_place method in iter.