Skip to content

Remove usage of to_stable_hash_key when stable hashing hash maps #119390

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

Closed
wants to merge 1 commit into from

Conversation

Kobzol
Copy link
Contributor

@Kobzol Kobzol commented Dec 28, 2023

I tried to look for some types that had an expensive to_stable_hash_key implementation and move them to HashStable instead. Let's see if there's any perf. impact.

@rustbot
Copy link
Collaborator

rustbot commented Dec 28, 2023

r? @cjgillot

(rustbot has picked a reviewer for you, use r? to override)

@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 Dec 28, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 28, 2023

@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 Dec 28, 2023
@bors
Copy link
Collaborator

bors commented Dec 28, 2023

⌛ Trying commit e219c53 with merge e920371...

bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 28, 2023
Remove usage of `to_stable_hash_key` when stable hashing hash maps

I tried to look for some types that had an expensive `to_stable_hash_key` implementation and move them to `HashStable` instead. Let's see if there's any perf. impact.
@bors
Copy link
Collaborator

bors commented Dec 28, 2023

☀️ Try build successful - checks-actions
Build commit: e920371 (e920371d99e09e26858849d1307758788199d8bd)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (e920371): comparison URL.

Overall result: ✅ improvements - no action needed

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.

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

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

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

Max RSS (memory usage)

Results

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)
0.4% [0.4%, 0.4%] 1
Regressions ❌
(secondary)
3.4% [3.4%, 3.4%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.7% [-2.2%, -1.1%] 2
All ❌✅ (primary) 0.4% [0.4%, 0.4%] 1

Cycles

Results

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

Binary size

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

Bootstrap: 671.862s -> 673.243s (0.21%)
Artifact size: 312.35 MiB -> 312.32 MiB (-0.01%)

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Dec 28, 2023
@Kobzol
Copy link
Contributor Author

Kobzol commented Dec 29, 2023

Hmm, no big effect. And since #119192 will probably remove most remaining usages of hashmaps in stable hashing soon, it's probably not worth it to do this.

@Kobzol Kobzol closed this Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants