Skip to content

Conversation

lolbinarycat
Copy link
Contributor

Unsure if these will be anything substantial, but the first one at least should git rid of quite a few branches, second one unsure if it's worth it.

r? @GuillaumeGomez

@rustbot rustbot added 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-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Aug 25, 2025
@GuillaumeGomez
Copy link
Member

Start a perf check whenever you think it's ready. 👍

@lolbinarycat
Copy link
Contributor Author

Honestly I kinda want a baseline to see if a few tiny changes like this will show up at all or not.

Even if it shows up as no change, that is useful data for future optimization attempts.

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rust-bors

This comment has been minimized.

rust-bors bot added a commit that referenced this pull request Aug 25, 2025
rustdoc: a few micro-optimizations targeted at build_impl
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 25, 2025
@rust-bors
Copy link

rust-bors bot commented Aug 25, 2025

☀️ Try build successful (CI)
Build commit: 05c0f81 (05c0f818fe424341111ec6f6ccc79df099d0a142, parent: b779120cad2c93e53c0dfb7007c1214b2b275183)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (05c0f81): comparison URL.

Overall result: ❌✅ regressions and improvements - no action needed

Benchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

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
Regressions ❌
(secondary)
0.2% [0.2%, 0.2%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.5% [-0.7%, -0.2%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.6%, secondary -1.1%)

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

mean range count
Regressions ❌
(primary)
2.4% [2.4%, 2.4%] 1
Regressions ❌
(secondary)
2.0% [2.0%, 2.0%] 1
Improvements ✅
(primary)
-1.6% [-2.0%, -1.1%] 3
Improvements ✅
(secondary)
-2.1% [-3.2%, -1.3%] 3
All ❌✅ (primary) -0.6% [-2.0%, 2.4%] 4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 467.387s -> 467.14s (-0.05%)
Artifact size: 378.40 MiB -> 378.39 MiB (-0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Aug 25, 2025
@lolbinarycat
Copy link
Contributor Author

Ok yeah, this is about what I expected, a small but measurable improvement to build_impl (actually around 2% of the functions runtime, which seems about right for eliminating a few branches in a loop), and somewhat noisy changes to memory usage (i believe we're reducing heap fragmentation when doc_only is set, but otherwise it may actually increase it? depends on the specifics of the allocator used and what state its in).

Confident the first change is worth it, unsure about the second.

@GuillaumeGomez
Copy link
Member

The only improvement I see is:

image

Which is quite minor and could be noise.

@lolbinarycat
Copy link
Contributor Author

If you look at the branch-misses metric there's quite a lot of improvements which would be what I expect.

https://perf.rust-lang.org/compare.html?start=b779120cad2c93e53c0dfb7007c1214b2b275183&end=05c0f818fe424341111ec6f6ccc79df099d0a142&stat=branch-misses

image

@GuillaumeGomez
Copy link
Member

Didn't even know there were other metrics. O.o

Anyway, only improvements so feel free to r=me.

@lolbinarycat
Copy link
Contributor Author

@bors r=GuillaumeGomez

@bors
Copy link
Collaborator

bors commented Aug 26, 2025

📌 Commit f16d1fc has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Aug 26, 2025
@GuillaumeGomez
Copy link
Member

@bors r-

@lolbinarycat
Copy link
Contributor Author

lolbinarycat commented Aug 26, 2025

whoops, meant to push to a new branch (reset the branch back to the approved commit)

@bors r=GuillaumeGomez

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 26, 2025
@bors
Copy link
Collaborator

bors commented Aug 26, 2025

📌 Commit f16d1fc has been approved by GuillaumeGomez

It is now in the queue for this repository.

@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 Aug 26, 2025
@bors
Copy link
Collaborator

bors commented Aug 27, 2025

⌛ Testing commit f16d1fc with merge cdb45c8...

@bors
Copy link
Collaborator

bors commented Aug 28, 2025

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing cdb45c8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Aug 28, 2025
@bors bors merged commit cdb45c8 into rust-lang:master Aug 28, 2025
22 checks passed
@rustbot rustbot added this to the 1.91.0 milestone Aug 28, 2025
@rust-log-analyzer
Copy link
Collaborator

A job failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
Prepare workflow directory
Prepare all required actions
Getting action download info
Download action repository 'actions/checkout@v5' (SHA:08c6903cd8c0fde910a37f88322edcfb5dd907a8)
Complete job name: DockerHub mirror
##[group]Run actions/checkout@v5
with:
  persist-credentials: false
  repository: rust-lang/rust
  token: ***
---
http.https://github.com/.extraheader
[command]/usr/bin/git config --local --unset-all http.https://github.com/.extraheader
[command]/usr/bin/git submodule foreach --recursive sh -c "git config --local --name-only --get-regexp 'http\.https\:\/\/github\.com\/\.extraheader' && git config --local --unset-all 'http.https://github.com/.extraheader' || :"
##[endgroup]
##[group]Run echo "***" | docker login ghcr.io -u rust-lang --password-stdin
echo "***" | docker login ghcr.io -u rust-lang --password-stdin
shell: /usr/bin/bash -e {0}
##[endgroup]
Error response from daemon: Get "https://ghcr.io/v2/": Get "https://ghcr.io/token?account=rust-lang&client_id=docker&offline_token=true&service=ghcr.io": net/http: request canceled (Client.Timeout exceeded while awaiting headers) (Client.Timeout exceeded while awaiting headers)
##[error]Process completed with exit code 1.
Post job cleanup.

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 d829133 (parent) -> cdb45c8 (this PR)

Test differences

Show 4 test diffs

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

Test dashboard

Run

cargo run --manifest-path src/ci/citool/Cargo.toml -- \
    test-dashboard cdb45c87e2cd43495379f7e867e3cc15dcee9f93 --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. aarch64-apple: 6093.1s -> 16222.6s (166.2%)
  2. dist-aarch64-apple: 7603.6s -> 6594.5s (-13.3%)
  3. dist-x86_64-solaris: 5910.2s -> 5274.3s (-10.8%)
  4. dist-sparcv9-solaris: 4948.3s -> 5449.8s (10.1%)
  5. x86_64-gnu-llvm-19: 2673.4s -> 2455.3s (-8.2%)
  6. dist-armhf-linux: 4782.8s -> 5137.6s (7.4%)
  7. dist-armv7-linux: 5125.5s -> 5472.4s (6.8%)
  8. x86_64-msvc-ext3: 6734.5s -> 6292.9s (-6.6%)
  9. dist-ohos-aarch64: 4463.4s -> 4195.0s (-6.0%)
  10. x86_64-msvc-ext1: 7229.9s -> 7584.5s (4.9%)
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 (cdb45c8): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

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
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.1%] 8
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.0%, secondary 0.3%)

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)
10.5% [10.5%, 10.5%] 1
Improvements ✅
(primary)
-2.0% [-2.5%, -1.7%] 3
Improvements ✅
(secondary)
-1.7% [-2.5%, -1.3%] 5
All ❌✅ (primary) -2.0% [-2.5%, -1.7%] 3

Cycles

Results (secondary 3.9%)

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)
3.9% [3.9%, 3.9%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 469.024s -> 469.05s (0.01%)
Artifact size: 391.16 MiB -> 391.17 MiB (0.00%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants