Skip to content
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

Stable Hash: Ignore all HirIds that just identify the node itself #135329

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Jan 10, 2025

This should provide better incremental caching, but it seems there is more to it.

These IDs also serve no purpose being in the stable hash of the item they refer to, only when referring to another item is it important that we hash the HirId. So we can at least avoid the cost during stable hashing, even if we don't benefit from it by avoiding some queries' caches from being invalidated

Unsure how to make sure we do this right by construction. Would be nice to do something type based

@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2025

r? @petrochenkov

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

@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 Jan 10, 2025
@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 10, 2025

@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 Jan 10, 2025
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 10, 2025
Stable Hash: Ignore all HirIds that just identify the node itself

This should provide better incremental caching. These IDs also serve no purpose being in the stable hash of the item they refer to, only when referring to *another* item is it important that we hash the `HirId`.

Unsure how to make sure we do this right by construction. Would be nice to do something type based
@bors
Copy link
Collaborator

bors commented Jan 10, 2025

⌛ Trying commit ad7bb20 with merge f0fb86e...

@bors
Copy link
Collaborator

bors commented Jan 10, 2025

☀️ Try build successful - checks-actions
Build commit: f0fb86e (f0fb86e6d75f7775a227ea2728a902286d87427a)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (f0fb86e): 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 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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-1.0%, -0.1%] 175
Improvements ✅
(secondary)
-0.5% [-1.3%, -0.1%] 87
All ❌✅ (primary) -0.4% [-1.0%, -0.1%] 175

Max RSS (memory usage)

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

Cycles

Results (primary -1.4%, secondary -6.2%)

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
Regressions ❌
(secondary)
2.4% [2.4%, 2.4%] 1
Improvements ✅
(primary)
-1.4% [-1.4%, -1.4%] 1
Improvements ✅
(secondary)
-7.6% [-8.8%, -6.7%] 6
All ❌✅ (primary) -1.4% [-1.4%, -1.4%] 1

Binary size

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

Bootstrap: 763.376s -> 765.068s (0.22%)
Artifact size: 325.75 MiB -> 325.77 MiB (0.01%)

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

oli-obk commented Jan 10, 2025

Hmm sad, no changes in query executions, meaning I didn't improve caching but just avoided the unnecessary hashing. Oh well, a win is a win, I'll investigate further

@oli-obk
Copy link
Contributor Author

oli-obk commented Jan 13, 2025

r? compiler

@rustbot rustbot assigned Noratrieb and unassigned petrochenkov Jan 13, 2025
@Noratrieb
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 17, 2025

📌 Commit ad7bb20 has been approved by Noratrieb

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 Jan 17, 2025
@bors
Copy link
Collaborator

bors commented Jan 17, 2025

⌛ Testing commit ad7bb20 with merge 6067b36...

@bors
Copy link
Collaborator

bors commented Jan 17, 2025

☀️ Test successful - checks-actions
Approved by: Noratrieb
Pushing 6067b36 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 17, 2025
@bors bors merged commit 6067b36 into rust-lang:master Jan 17, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 17, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (6067b36): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.4% [-0.9%, -0.1%] 169
Improvements ✅
(secondary)
-0.5% [-1.3%, -0.1%] 85
All ❌✅ (primary) -0.4% [-0.9%, -0.1%] 169

Max RSS (memory usage)

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

Cycles

Results (primary -0.8%, secondary -3.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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.8% [-0.8%, -0.8%] 1
Improvements ✅
(secondary)
-3.4% [-3.7%, -2.8%] 3
All ❌✅ (primary) -0.8% [-0.8%, -0.8%] 1

Binary size

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

Bootstrap: 763.784s -> 763.854s (0.01%)
Artifact size: 326.10 MiB -> 326.09 MiB (-0.00%)

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.

6 participants