Don't collect() when size_hint is useless#53019
Merged
bors merged 1 commit intorust-lang:masterfrom Aug 13, 2018
Merged
Conversation
Contributor
|
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
Contributor
|
Why is the |
Contributor
Author
Contributor
|
@bors try @Mark-Simulacrum perf? |
Collaborator
|
⌛ Trying commit b68b396 with merge 8e2e6c66ea86427aaa922f7b5e6eea92cc4f9a51... |
Collaborator
|
☀️ Test successful - status-travis |
Member
|
@rust-timer build 8e2e6c66ea86427aaa922f7b5e6eea92cc4f9a51 |
Collaborator
|
Success: Queued 8e2e6c66ea86427aaa922f7b5e6eea92cc4f9a51 with parent 3f4f18f, comparison URL. |
Contributor
|
@bors r+ rollup |
Collaborator
|
📌 Commit b68b396 has been approved by |
kennytm
added a commit
to kennytm/rust
that referenced
this pull request
Aug 10, 2018
Don't collect() when size_hint is useless This adjusts PRs rust-lang#52738 and rust-lang#52697 by falling back to calculating capacity and extending or pushing in a loop where `collect()` can't be trusted to calculate the right capacity. It is a performance win.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Aug 12, 2018
Don't collect() when size_hint is useless This adjusts PRs rust-lang#52738 and rust-lang#52697 by falling back to calculating capacity and extending or pushing in a loop where `collect()` can't be trusted to calculate the right capacity. It is a performance win.
bors
added a commit
that referenced
this pull request
Aug 12, 2018
Rollup of 15 pull requests Successful merges: - #52955 (Update compiler test documentation) - #53019 (Don't collect() when size_hint is useless) - #53025 (Consider changing assert! to debug_assert! when it calls visit_with) - #53059 (Remove explicit returns where unnecessary) - #53165 ( Add aarch64-unknown-netbsd target) - #53210 (Deny future duplication of rustc-ap-syntax) - #53223 (A few cleanups for rustc_data_structures) - #53230 ([nll] enable feature(nll) on various crates for bootstrap: part 4) - #53231 (Add let keyword doc) - #53240 (Add individual documentation for <integer>`.swap_bytes`/.`reverse_bits`) - #53253 (Remove unwanted console log) - #53264 (Show that Command can be reused and remodified) - #53267 (Fix styles) - #53273 (Add links to std::char::REPLACEMENT_CHARACTER from docs.) - #53283 (wherein we suggest float for integer literals where a float was expected) Failed merges: r? @ghost
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adjusts PRs #52738 and #52697 by falling back to calculating capacity and extending or pushing in a loop where
collect()can't be trusted to calculate the right capacity.It is a performance win.