Use Vec extend instead of repeated pushes on several places by Kobzol · Pull Request #91042 · rust-lang/rust

@jyn514 jyn514 added I-compiletime

Issue: Problems and improvements with respect to compile times.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

and removed S-waiting-on-perf

Status: Waiting on a perf run to be completed.

labels

Nov 19, 2021

the8472

nagisa

@nagisa nagisa added the S-waiting-on-author

Status: This is awaiting some action (such as code changes or more information) from the author.

label

Dec 8, 2021

@Kobzol

@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-author

Status: This is awaiting some action (such as code changes or more information) from the author.

labels

Dec 8, 2021

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 9, 2021
…askrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#91042 (Use Vec extend instead of repeated pushes on several places)
 - rust-lang#91476 (Improve 'cannot contain emoji' error.)
 - rust-lang#91568 (Pretty print break and continue without redundant space)
 - rust-lang#91645 (Implement `core::future::join!`)
 - rust-lang#91666 (update Miri)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Dec 9, 2021
Use Vec extend instead of repeated pushes on several places

Inspired by rust-lang#90813, I tried to use a simple regex (`for .*in.*\{\n.*push\(.*\);\n\s+}`) to search for more places that would use `Vec::push` in a loop and replace them with `Vec::extend`.

These probably won't have as much perf. impact as the original PR (if any), but it would probably be better to do a perf run to see if there are not any regressions.

bors added a commit to rust-lang-ci/rust that referenced this pull request

Dec 9, 2021
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#87599 (Implement concat_bytes!)
 - rust-lang#89999 (Update std::env::temp_dir to use GetTempPath2 on Windows when available.)
 - rust-lang#90796 (Remove the reg_thumb register class for asm! on ARM)
 - rust-lang#91042 (Use Vec extend instead of repeated pushes on several places)
 - rust-lang#91634 (Do not attempt to suggest help for overly malformed struct/function call)
 - rust-lang#91685 (Install llvm tools to sysroot when assembling local toolchain)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

@Kobzol Kobzol deleted the vec-extend-cleanup branch

December 9, 2021 07:10