Skip to content

Conversation

@oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Nov 18, 2025

r? @fee1-dead

Let's see if we can get any benefit (even just metadata size) from not encoding the common case.

Inspired by #148434 (comment)

@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. labels Nov 18, 2025
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Nov 18, 2025

@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 Nov 18, 2025
Avoid encoding non-constness or non-asyncness in metadata
@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 18, 2025
@rust-bors
Copy link

rust-bors bot commented Nov 18, 2025

☀️ Try build successful (CI)
Build commit: d435932 (d435932627c93b6e1003e0f9f63e2585c1258b55, parent: c1995621a44398ac33ab368adbfb69753218b49e)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (d435932): comparison URL.

Overall result: no relevant changes - 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

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

Max RSS (memory usage)

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

Cycles

Results (primary -2.2%, secondary -4.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)
- - 0
Improvements ✅
(primary)
-2.2% [-2.2%, -2.2%] 1
Improvements ✅
(secondary)
-4.6% [-6.7%, -2.5%] 2
All ❌✅ (primary) -2.2% [-2.2%, -2.2%] 1

Binary size

Results (primary -0.2%, secondary -0.4%)

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)
-0.2% [-0.6%, -0.0%] 112
Improvements ✅
(secondary)
-0.4% [-1.4%, -0.0%] 60
All ❌✅ (primary) -0.2% [-0.6%, -0.0%] 112

Bootstrap: 474.876s -> 472.742s (-0.45%)
Artifact size: 388.76 MiB -> 388.77 MiB (0.00%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Nov 18, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Nov 18, 2025

Binary size reduction says this is def a thing, yay

@Kobzol
Copy link
Member

Kobzol commented Nov 18, 2025

@fee1-dead
Copy link
Member

Yay!

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 18, 2025

📌 Commit 357fd66 has been approved by fee1-dead

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 Nov 18, 2025
}
}

impl FixedSizeEncoding for ty::Asyncness {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we remove the other impl using fixed_size_enum!?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

on it, good catch

@bors
Copy link
Collaborator

bors commented Nov 19, 2025

⌛ Testing commit 357fd66 with merge 07bdbae...

@bors
Copy link
Collaborator

bors commented Nov 19, 2025

☀️ Test successful - checks-actions
Approved by: fee1-dead
Pushing 07bdbae to main...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 19, 2025
@bors bors merged commit 07bdbae into rust-lang:main Nov 19, 2025
13 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Nov 19, 2025
@oli-obk oli-obk deleted the min-encode branch November 19, 2025 15:25
@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 140044c (parent) -> 07bdbae (this PR)

Test differences

Show 22 test diffs

22 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 07bdbaedc63094281483c40a88a1a8f2f8ffadc5 --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: 3063.4s -> 4109.9s (+34.2%)
  2. x86_64-gnu-llvm-21-2: 5465.0s -> 6209.6s (+13.6%)
  3. aarch64-apple: 8794.4s -> 9872.8s (+12.3%)
  4. dist-i586-gnu-i586-i686-musl: 4785.7s -> 5356.1s (+11.9%)
  5. aarch64-gnu-debug: 4046.1s -> 4455.8s (+10.1%)
  6. x86_64-msvc-ext3: 6647.5s -> 6027.1s (-9.3%)
  7. x86_64-gnu-llvm-21-3: 5903.6s -> 6430.8s (+8.9%)
  8. x86_64-gnu-aux: 6377.1s -> 6924.4s (+8.6%)
  9. x86_64-gnu-llvm-20: 3170.9s -> 2904.8s (-8.4%)
  10. pr-check-2: 2619.6s -> 2419.1s (-7.7%)
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 (07bdbae): comparison URL.

Overall result: ❌✅ regressions and 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.1% [0.1%, 0.1%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.8% [-0.8%, -0.8%] 2
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -2.0%)

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

Cycles

Results (secondary 2.0%)

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)
2.0% [1.4%, 2.6%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Binary size

Results (primary -0.2%, secondary -0.4%)

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)
-0.2% [-0.6%, -0.0%] 112
Improvements ✅
(secondary)
-0.4% [-1.4%, -0.0%] 60
All ❌✅ (primary) -0.2% [-0.6%, -0.0%] 112

Bootstrap: 474.2s -> 477.858s (0.77%)
Artifact size: 388.76 MiB -> 388.67 MiB (-0.02%)

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants