Skip to content

[perf] rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible - #163217

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
fmease:rustdoc-less-re-lowering
Nov 3, 2026
Merged

rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
fmease:rustdoc-less-re-lowering

Conversation

@fmease

@fmease fmease commented Sep 23, 2026

Copy link
Copy Markdown
Member

(No LLM was or will be used by me during the entire creation process of this PR)

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Sep 23, 2026
@fmease

fmease commented Sep 23, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 23, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Sep 23, 2026
rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible
@fmease fmease added the C-cleanup Category: PRs that clean code up or issues documenting cleanup. label Sep 23, 2026
@rust-bors

rust-bors Bot commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: bcb47ea (bcb47ead48b72b7a7467bb2a80cc83101b1aa48d)
Base parent: 9a9d194 (9a9d1946d1e119676b7a6a8a26a264061e61027d)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (bcb47ea): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf.

@bors rollup=never rustc-perf
@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
Improvements ✅
(primary)
-1.9% [-3.8%, -0.2%] 6
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -1.9% [-3.8%, -0.2%] 6

Max RSS (memory usage)

Results (primary -2.4%, secondary -0.9%)

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

mean range count
Regressions ❌
(primary)
1.1% [1.1%, 1.1%] 1
Regressions ❌
(secondary)
0.9% [0.9%, 0.9%] 1
Improvements ✅
(primary)
-4.1% [-4.9%, -3.3%] 2
Improvements ✅
(secondary)
-2.7% [-2.7%, -2.7%] 1
All ❌✅ (primary) -2.4% [-4.9%, 1.1%] 3

Cycles

Results (primary -3.1%, secondary -7.6%)

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.0% [2.6%, 3.6%] 3
Improvements ✅
(primary)
-3.1% [-4.5%, -1.7%] 2
Improvements ✅
(secondary)
-13.9% [-25.6%, -4.6%] 5
All ❌✅ (primary) -3.1% [-4.5%, -1.7%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 489.957s -> 487.674s (-0.47%)
Artifact size: 407.04 MiB -> 406.34 MiB (-0.17%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Sep 23, 2026
@fmease fmease added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Sep 24, 2026
@fmease

fmease commented Sep 24, 2026

Copy link
Copy Markdown
Member Author

The main improvement most likely comes from the change described in #162916 (comment) in PR #162916. Since that PR also makes that change (it forcibly falls out of major refactorings), I'll wait it to get merged & then re-perf this PR.

@rust-bors

This comment has been minimized.

@fmease
fmease force-pushed the rustdoc-less-re-lowering branch from 3f67398 to 9294c4b Compare November 3, 2026 12:21
@fmease fmease added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Nov 3, 2026
@fmease

fmease commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

@bors try @rust-timer queue

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 3, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible
@rust-bors

This comment has been minimized.

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 2403a0b (2403a0b9762650608bb90255a733d1245bf4128d)
Base parent: 6a98084 (6a98084e4a21b04504c034dfc640e35e32ab9854)

@rust-timer

This comment has been minimized.

@rust-timer

Copy link
Copy Markdown
Collaborator

Finished benchmarking commit (2403a0b): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking means the PR may be perf-sensitive. Consider adding rollup=never if this change is not fit for rolling up.

@bors rollup=iffy rustc-perf
@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
Improvements ✅
(primary)
-2.3% [-2.4%, -2.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -2.3% [-2.4%, -2.3%] 2

Max RSS (memory usage)

Results (primary -1.6%, secondary -2.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)
- - 0
Improvements ✅
(primary)
-1.6% [-1.8%, -1.4%] 2
Improvements ✅
(secondary)
-2.3% [-3.0%, -1.3%] 3
All ❌✅ (primary) -1.6% [-1.8%, -1.4%] 2

Cycles

Results (primary 3.4%)

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

mean range count
Regressions ❌
(primary)
3.4% [2.8%, 4.0%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.4% [2.8%, 4.0%] 2

Binary size

This perf run didn't have relevant results for this metric.

Bootstrap: 482.475s -> 482.94s (0.10%)
Artifact size: 406.38 MiB -> 406.39 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 3, 2026
@fmease fmease changed the title rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible [perf] rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible Nov 3, 2026
@fmease
fmease marked this pull request as ready for review November 3, 2026 14:58
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 3, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Nov 3, 2026
@rustbot

rustbot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

r? @GuillaumeGomez

rustbot has assigned @GuillaumeGomez.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: rustdoc
  • rustdoc expanded to 8 candidates
  • Random selection from GuillaumeGomez, lolbinarycat, notriddle

@GuillaumeGomez

Copy link
Copy Markdown
Member

Nice improvement considering the small amount of code updated. Looking forward for the next improvements!

@bors r+

@rust-bors

rust-bors Bot commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

📌 Commit 9294c4b has been approved by GuillaumeGomez

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 Nov 3, 2026
rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - #165416 (fix unsoundness when compiling `[diverging_const; 0]`)
 - #163217 ([perf] rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible)
 - #165371 (Don't use `llvm_type` as the type of `static`s.)
 - #165354 (Remove `AbiAlign`)
 - #165357 (rustdoc: Fix invalid clean of paths when they end with `self`)
 - #165401 (Add codegen test for step_by(1) loop vectorization)
 - #165408 (LLVMRustWriteOutputFile: Check the result of runCodeGenPipeline)
rust-bors Bot pushed a commit that referenced this pull request Nov 3, 2026
Rollup merge of #163217 - fmease:rustdoc-less-re-lowering, r=GuillaumeGomez

[perf] rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>
@rust-bors
rust-bors Bot merged commit 1d0e177 into rust-lang:main Nov 3, 2026
15 checks passed
@rustbot rustbot added this to the 1.101.0 milestone Nov 3, 2026
@fmease
fmease deleted the rustdoc-less-re-lowering branch November 4, 2026 00:17
RalfJung pushed a commit to RalfJung/miri that referenced this pull request Nov 4, 2026
…uwer

Rollup of 7 pull requests

Successful merges:

 - rust-lang/rust#165416 (fix unsoundness when compiling `[diverging_const; 0]`)
 - rust-lang/rust#163217 ([perf] rustdoc: Avoid re-HIR-ty-lowering tys & const args where possible)
 - rust-lang/rust#165371 (Don't use `llvm_type` as the type of `static`s.)
 - rust-lang/rust#165354 (Remove `AbiAlign`)
 - rust-lang/rust#165357 (rustdoc: Fix invalid clean of paths when they end with `self`)
 - rust-lang/rust#165401 (Add codegen test for step_by(1) loop vectorization)
 - rust-lang/rust#165408 (LLVMRustWriteOutputFile: Check the result of runCodeGenPipeline)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-cleanup Category: PRs that clean code up or issues documenting cleanup. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants