Skip to content

Document BinaryHeap time complexity - #60952

Merged
bors merged 1 commit into
rust-lang:masterfrom
dtolnay:heap
May 21, 2019
Merged

bors merged 1 commit into
rust-lang:masterfrom
dtolnay:heap

Conversation

@dtolnay

@dtolnay dtolnay commented May 19, 2019

Copy link
Copy Markdown
Member

I went into some detail on the time complexity of push because it is relevant for using BinaryHeap efficiently -- specifically that you should avoid pushing many elements in ascending order when possible.

r? @Amanieu
Closes #47976. Closes #59698.

I went into some detail on the time complexity of `push` because it is
relevant for using BinaryHeap efficiently -- specifically that you
should avoid pushing many elements in ascending order when possible.
@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 19, 2019
@Amanieu

Amanieu commented May 20, 2019

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented May 20, 2019

Copy link
Copy Markdown
Collaborator

📌 Commit ea7aa76 has been approved by Amanieu

@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 May 20, 2019
@michaelwoerister

Copy link
Copy Markdown
Member

@bors rollup

Centril added a commit to Centril/rust that referenced this pull request May 20, 2019
Document BinaryHeap time complexity

I went into some detail on the time complexity of `push` because it is relevant for using BinaryHeap efficiently -- specifically that you should avoid pushing many elements in ascending order when possible.

r? @Amanieu
Closes rust-lang#47976. Closes rust-lang#59698.
bors added a commit that referenced this pull request May 20, 2019
Rollup of 11 pull requests

Successful merges:

 - #60383 (Fix position source code files toggle)
 - #60453 (Fall back to `/dev/urandom` on `EPERM` for `getrandom`)
 - #60487 (Fix search sidebar width when no crate select is present)
 - #60511 (Fix intra-doc link resolution failure on re-exporting libstd)
 - #60823 (Fix incremental compilation of cdylib emitting spurious unused_attributes lint)
 - #60915 (stable hashing: Remove unused field and add documentation.)
 - #60942 (Misc changes to rustc_metadata)
 - #60952 (Document BinaryHeap time complexity)
 - #60959 (rustc: Improve type size assertions)
 - #60972 (remove confusing remarks about mixed volatile and non-volatile accesses)
 - #60983 (Set -funwind-tables and -fno-exceptions unconditionally for LLVM's libunwind)

Failed merges:

r? @ghost
@bors
bors merged commit ea7aa76 into rust-lang:master May 21, 2019
@dtolnay
dtolnay deleted the heap branch May 21, 2019 00:36
@dtolnay dtolnay added I-slow Issue: Problems and improvements with respect to performance of generated code. A-collections Area: `std::collections` (prefer A-binaryheap, A-btree, A-hashtable, A-linkedlist, A-vecdeque) A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-libs Relevant to the library team, which will review and decide on the PR/issue. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 14, 2025
@clarfonthey clarfonthey added A-binaryheap Area: `std::collections::BinaryHeap` and removed A-collections Area: `std::collections` (prefer A-binaryheap, A-btree, A-hashtable, A-linkedlist, A-vecdeque) labels Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-binaryheap Area: `std::collections::BinaryHeap` A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools I-slow Issue: Problems and improvements with respect to performance of generated code. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Collections documentation could mention performance of BinaryHeap impl

6 participants