-
Notifications
You must be signed in to change notification settings - Fork 13.7k
rustdoc: a few micro-optimizations targeted at build_impl #145851
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Start a perf check whenever you think it's ready. 👍
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
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
rustdoc: a few micro-optimizations targeted at build_impl
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (05c0f81): comparison URL. Overall result: ❌✅ regressions and improvements - no action neededBenchmarking 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 Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 467.387s -> 467.14s (-0.05%) |
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.
If you look at the branch-misses
metric there's quite a lot of improvements which would be what I expect.
Didn't even know there were other metrics. O.o
Anyway, only improvements so feel free to r=me.
@bors r=GuillaumeGomez
dc45ff1
to
f16d1fc
Compare
@bors r-
whoops, meant to push to a new branch (reset the branch back to the approved commit)
@bors r=GuillaumeGomez
☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing cdb45c8 to master...
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.
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
- aarch64-apple: 6093.1s -> 16222.6s (166.2%)
- dist-aarch64-apple: 7603.6s -> 6594.5s (-13.3%)
- dist-x86_64-solaris: 5910.2s -> 5274.3s (-10.8%)
- dist-sparcv9-solaris: 4948.3s -> 5449.8s (10.1%)
- x86_64-gnu-llvm-19: 2673.4s -> 2455.3s (-8.2%)
- dist-armhf-linux: 4782.8s -> 5137.6s (7.4%)
- dist-armv7-linux: 5125.5s -> 5472.4s (6.8%)
- x86_64-msvc-ext3: 6734.5s -> 6292.9s (-6.6%)
- dist-ohos-aarch64: 4463.4s -> 4195.0s (-6.0%)
- 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.
Finished benchmarking commit (cdb45c8): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
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.
CyclesResults (secondary 3.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 469.024s -> 469.05s (0.01%) |
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