Skip to content

Conversation

@the8472
Copy link
Member

@the8472 the8472 commented Jan 18, 2026

Redoing #130998
It was reverted in #151150 due to flakiness. I have traced this to layout randomization perturbing the test (the failure reproduces locally with layout randomization), which is now excluded.

@rustbot
Copy link
Collaborator

rustbot commented Jan 18, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jan 18, 2026
@the8472 the8472 changed the title optimize vec.append(slice.to_vec()), take 2 optimize vec.extend(slice.to_vec()), take 2 Jan 18, 2026
@tbu-
Copy link
Contributor

tbu- commented Jan 20, 2026

Does it make sense to add an optimization that breaks with layout randomization?

@the8472
Copy link
Member Author

the8472 commented Jan 20, 2026

Layout randomization is primarily for debugging (it pessimizes struct layouts after all), and the optimization is nice-to-have so I think it's ok.
At worst it indicates that the optimization is brittle, but even with randomization it still worked for the Vec->Vec case, just the String->String case broke for some reason, not sure why.

@Mark-Simulacrum
Copy link
Member

@bors r+ rollup=iffy

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 25, 2026

📌 Commit 2b8f4a5 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors bot 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 Jan 25, 2026
@rust-bors

This comment has been minimized.

@rust-bors rust-bors bot added merged-by-bors This PR was explicitly merged by bors. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 25, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 25, 2026

☀️ Test successful - CI
Approved by: Mark-Simulacrum
Duration: 3h 20m 56s
Pushing 873d468 to main...

@rust-bors rust-bors bot merged commit 873d468 into rust-lang:main Jan 25, 2026
12 checks passed
@rustbot rustbot added this to the 1.95.0 milestone Jan 25, 2026
@github-actions
Copy link
Contributor

What is this? This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.

Comparing 38c7129 (parent) -> 873d468 (this PR)

Test differences

Show 201 test diffs

Stage 1

  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> pass (J2)
  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> ignore (ignored when randomizing layouts) (J3)
  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J5)

Stage 2

  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> pass (J0)
  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> ignore (ignored when the LLVM version 20.1.8 is older than 21.0.0) (J1)
  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> ignore (ignored when the LLVM version 20.1.2 is older than 21.0.0) (J4)
  • [codegen] tests/codegen-llvm/lib-optimizations/append-elements.rs: [missing] -> ignore (ignored when randomizing layouts) (J6)

Additionally, 194 doctest diffs were found. These are ignored, as they are noisy.

Job group index

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard 873d4682c7d285540b8f28bfe637006cef8918a6 --output-dir test-dashboard

And then open test-dashboard/index.html in your browser to see an overview of all executed tests.

Job duration changes

  1. dist-apple-various: 4766.0s -> 3378.1s (-29.1%)
  2. x86_64-rust-for-linux: 2429.6s -> 2695.0s (+10.9%)
  3. dist-x86_64-apple: 6596.3s -> 7265.6s (+10.1%)
  4. dist-i686-linux: 5877.2s -> 6432.7s (+9.5%)
  5. x86_64-gnu-llvm-21-1: 3831.1s -> 4140.6s (+8.1%)
  6. i686-gnu-2: 4901.4s -> 5279.1s (+7.7%)
  7. aarch64-gnu-llvm-20-2: 2915.3s -> 2700.0s (-7.4%)
  8. x86_64-gnu-tools: 3086.7s -> 3308.8s (+7.2%)
  9. aarch64-gnu-llvm-20-1: 3396.8s -> 3174.9s (-6.5%)
  10. arm-android: 5721.3s -> 6086.4s (+6.4%)
How to interpret the job duration changes?

Job durations can vary a lot, based on the actual runner instance
that executed the job, system noise, invalidated caches, etc. The table above is provided
mostly for t-infra members, for simpler debugging of potential CI slow-downs.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (873d468): comparison URL.

Overall result: ❌✅ regressions and improvements - please read the text below

Our benchmarks found a performance regression caused by this PR.
This might be an actual regression, but it can also be just noise.

Next Steps:

  • If the regression was expected or you think it can be justified,
    please write a comment with sufficient written justification, and add
    @rustbot label: +perf-regression-triaged to it, to mark the regression as triaged.
  • If you think that you know of a way to resolve the regression, try to create
    a new PR with a fix for the regression.
  • If you do not understand the regression or you think that it is just noise,
    you can ask the @rust-lang/wg-compiler-performance working group for help (members of this group
    were already notified of this PR).

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

Instruction count

Our most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.

mean range count
Regressions ❌
(primary)
0.6% [0.3%, 1.0%] 6
Regressions ❌
(secondary)
0.3% [0.0%, 0.7%] 4
Improvements ✅
(primary)
-0.6% [-0.7%, -0.5%] 2
Improvements ✅
(secondary)
-0.5% [-4.2%, -0.0%] 12
All ❌✅ (primary) 0.3% [-0.7%, 1.0%] 8

Max RSS (memory usage)

Results (primary 0.2%, secondary -3.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
3.2% [2.1%, 3.8%] 3
Regressions ❌
(secondary)
3.0% [3.0%, 3.0%] 1
Improvements ✅
(primary)
-2.9% [-3.4%, -2.4%] 3
Improvements ✅
(secondary)
-5.0% [-5.7%, -4.3%] 5
All ❌✅ (primary) 0.2% [-3.4%, 3.8%] 6

Cycles

Results (primary -7.5%, secondary -1.7%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.5% [4.3%, 4.6%] 2
Improvements ✅
(primary)
-7.5% [-13.9%, -0.7%] 14
Improvements ✅
(secondary)
-4.2% [-7.6%, -2.2%] 5
All ❌✅ (primary) -7.5% [-13.9%, -0.7%] 14

Binary size

Results (primary -0.0%, secondary 0.0%)

A less reliable metric. May be of interest, but not used to determine the overall result above.

mean range count
Regressions ❌
(primary)
0.1% [0.0%, 0.2%] 19
Regressions ❌
(secondary)
0.1% [0.1%, 0.1%] 2
Improvements ✅
(primary)
-0.2% [-0.6%, -0.0%] 9
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.0%] 2
All ❌✅ (primary) -0.0% [-0.6%, 0.2%] 28

Bootstrap: 474.192s -> 474.052s (-0.03%)
Artifact size: 383.57 MiB -> 383.68 MiB (0.03%)

@rustbot rustbot added the perf-regression Performance regression. label Jan 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. merged-by-bors This PR was explicitly merged by bors. perf-regression Performance regression. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. 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.

5 participants