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

Fix documentation of asymptotic complexity for rustc_data_structures::SortedMap #105010

Merged
merged 1 commit into from
Nov 29, 2022

Conversation

Neutron3529
Copy link
Contributor

@rustbot
Copy link
Collaborator

rustbot commented Nov 28, 2022

r? @wesleywiser

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 28, 2022
@wesleywiser
Copy link
Member

r? libs-api

@rustbot rustbot assigned dtolnay and unassigned wesleywiser Nov 28, 2022
@dtolnay
Copy link
Member

dtolnay commented Nov 28, 2022

r? compiler

@rustbot rustbot assigned oli-obk and unassigned dtolnay Nov 28, 2022
@jyn514
Copy link
Member

jyn514 commented Nov 28, 2022

The new comment looks correct. lookup_index_for uses binary search which is O(log N) and insert can end up copying the whole array for an early index: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.insert

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 28, 2022

📌 Commit 11525e5 has been approved by jyn514

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 28, 2022
@jyn514 jyn514 changed the title fix document Fix documentation of asymptotic complexity for rustc_data_strctures::SortedMap Nov 28, 2022
@dtolnay dtolnay changed the title Fix documentation of asymptotic complexity for rustc_data_strctures::SortedMap Fix documentation of asymptotic complexity for rustc_data_structures::SortedMap Nov 28, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Nov 28, 2022
Fix documentation of asymptotic complexity for rustc_data_structures::SortedMap

https://users.rust-lang.org/t/is-the-document-in-sortedmap-in-rustc-data-structures-sorted-map-correct/84939

SortedMap have `O(n)` insertions and removal rather than `O(log(n))`
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 29, 2022
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#104465 (Document more settings for building rustc for Fuchsia)
 - rust-lang#104951 (Simplify checking for `GeneratorKind::Async`)
 - rust-lang#104959 (Revert rust-lang#104269 (to avoid spurious hang/test failure in CI))
 - rust-lang#104978 (notify the rust-analyzer team on changes to the rust-analyzer subtree)
 - rust-lang#105010 (Fix documentation of asymptotic complexity for rustc_data_structures::SortedMap)
 - rust-lang#105016 (Add sentence when rustdoc search is running)
 - rust-lang#105020 (rustdoc: merge background-image rules in rustdoc-toggle CSS)
 - rust-lang#105024 (rustdoc: remove `fnname` CSS class that's styled exactly like `fn`)
 - rust-lang#105027 (Rustdoc-Json: Add tests for linking to foreign variants.)
 - rust-lang#105038 (Clean up pr 104954)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d5d79ac into rust-lang:master Nov 29, 2022
@rustbot rustbot added this to the 1.67.0 milestone Nov 29, 2022
@rustbot
Copy link
Collaborator

rustbot commented Jun 2, 2023

Assignment is not allowed on a closed PR.

@jyn514 jyn514 added the A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools label Jun 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants