-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Only store StableCrateId once in DefPathTable. #119259
Conversation
r? @b-naber (rustbot has picked a reviewer for you, use r? to override) |
def_path_hash_to_index: Default::default(), | ||
} | ||
} | ||
|
||
fn allocate(&mut self, key: DefKey, def_path_hash: DefPathHash) -> DefIndex { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW it looks like we're also hashing the parent's stable crate ID into the local part of this hash --
rust/compiler/rustc_hir/src/definitions.rs
Line 120 in 5eccfc3
parent.hash(&mut hasher); |
It's probably pretty cheap (just an extra u64 hashed in) but seems like it would be correct to skip that hashing since we're not crossing crate boundaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes a lot of hash-dependent behaviour, so I'll investigate this in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perf results don't look particularly meaningful either, so it might not really matter.
r=me |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Only store StableCrateId once in DefPathTable. rust-lang#119238 made me think of this. cc `@Mark-Simulacrum`
This comment has been minimized.
This comment has been minimized.
☀️ Try build successful - checks-actions |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (53c94be): comparison URL. Overall result: ❌✅ regressions and improvements - ACTION NEEDEDBenchmarking 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 @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeResultsThis 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.
Bootstrap: 670.687s -> 670.155s (-0.08%) |
cbe64c2
to
179cf7d
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
c1fb22b
to
821920b
Compare
@bors r+ |
☀️ Test successful - checks-actions |
Finished benchmarking commit (dc450f9): comparison URL. Overall result: ✅ improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Binary sizeResultsThis 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.
Bootstrap: 670.236s -> 671.694s (0.22%) |
#119238 made me think of this.
cc @Mark-Simulacrum