-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Don't collect() when size_hint is useless #53019
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @estebank (rust_highfive has picked a reviewer for you, use r? to override) |
Why is the |
@bors try @Mark-Simulacrum perf? |
⌛ Trying commit b68b396 with merge 8e2e6c66ea86427aaa922f7b5e6eea92cc4f9a51... |
☀️ Test successful - status-travis |
@rust-timer build 8e2e6c66ea86427aaa922f7b5e6eea92cc4f9a51 |
Success: Queued 8e2e6c66ea86427aaa922f7b5e6eea92cc4f9a51 with parent 3f4f18f, comparison URL. |
@bors r+ rollup |
📌 Commit b68b396 has been approved by |
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.
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.
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 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.