-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[perf] Cache the canonical *instantiation* of param-envs #142316
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
base: master
Are you sure you want to change the base?
Conversation
@bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[perf] Cache the canonical *instantiation* of param-envs r? lcnr
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (41eb046): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking 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 Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -1.0%, secondary -7.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 755.415s -> 752.897s (-0.33%) |
Let's try this again w/o the "highest var in clauses" optimization. |
10849bc
to
a74d247
Compare
Let's try this but with @bors2 try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
[perf] Cache the canonical *instantiation* of param-envs r? lcnr
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (98d94a4): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary -3.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary -7.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 754.802s -> 754.047s (-0.10%) |
fn fold_clauses(&mut self, c: ty::Clauses<'tcx>) -> ty::Clauses<'tcx> { | ||
if c.has_vars_bound_at_or_above(self.current_index) { | ||
if self.current_index == ty::INNERMOST { | ||
let index = highest_var_in_clauses(c); |
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.
instead have a separate Clauses -> usize
hashmap in the tcx?
as in
pub instantiate_clauses_cache: Lock<(
FxHashMap<ty::Clauses<'tcx>, usize>,
FxHashMap<(ty::Clauses<'tcx>, &'tcx [ty::GenericArg<'tcx>]), ty::Clauses<'tcx>>)
>,
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.
that was the previous perf run
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.
ah 😅 👍 u just too smart
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.
specifically i was double checking that the caching of the max var in the clauses was worth it, and it seems like it is
a74d247
to
835662b
Compare
r? lcnr