Skip to content

Conversation

@saethlin
Copy link
Member

r? ghost

Assessing how bad this is and/or which Hash impls are hot and when

@saethlin saethlin added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. labels Feb 19, 2025
@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 Feb 19, 2025
@saethlin saethlin removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 19, 2025
@saethlin
Copy link
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 Feb 19, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 19, 2025
[perf experiment] Hash interned values, not pointers

r? ghost

Assessing how bad this is and/or which Hash impls are hot and when
@bors
Copy link
Collaborator

bors commented Feb 19, 2025

⌛ Trying commit 4dee948 with merge 6c5885c...

@bors
Copy link
Collaborator

bors commented Feb 19, 2025

☀️ Try build successful - checks-actions
Build commit: 6c5885c (6c5885c827ab41d5deff7ccfa9009cbba83e5c14)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6c5885c): comparison URL.

Overall result: ❌ regressions - please read the text below

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

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

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
1.6% [0.2%, 14.9%] 245
Regressions ❌
(secondary)
1.8% [0.2%, 10.5%] 198
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.6% [0.2%, 14.9%] 245

Max RSS (memory usage)

Results (primary 1.4%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.4% [1.4%, 1.4%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 1.4% [1.4%, 1.4%] 1

Cycles

Results (primary 3.2%, secondary 4.0%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
3.4% [1.1%, 14.7%] 125
Regressions ❌
(secondary)
4.0% [1.8%, 11.9%] 57
Improvements ✅
(primary)
-4.4% [-4.9%, -4.0%] 4
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 3.2% [-4.9%, 14.7%] 129

Binary size

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

Bootstrap: 773.063s -> 790.285s (2.23%)
Artifact size: 362.34 MiB -> 362.79 MiB (0.12%)

@rustbot rustbot added perf-regression Performance regression. and removed S-waiting-on-perf Status: Waiting on a perf run to be completed. labels Feb 19, 2025
@compiler-errors
Copy link
Member

compiler-errors commented Feb 19, 2025

I assume a large portion of the regression (especially nalgebra, since it does a lot of trait solving) is b/c we're interning a ton of type system stuff (like clauses, etc) which are probably somewhat large/expensive to hash.

@saethlin
Copy link
Member Author

saethlin commented Mar 8, 2025

I did some slightly more deep inspection in the compiler by making the Hash impl for raw pointers panic, and it turns out that of course the compiler hashes pointers all over. I looked into the regressions above and I think there are better ways to stabilize our artifacts than undertaking such widespread changes.

@saethlin saethlin closed this Mar 8, 2025
@saethlin saethlin deleted the hash-for-real branch March 8, 2025 01:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

perf-regression Performance regression. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. 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.

5 participants