Conversation
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Don't hash `DelayedLints`
| /// Avoid calling this query directly. | ||
| query opt_ast_lowering_delayed_lints(key: hir::OwnerId) -> Option<&'tcx hir::lints::DelayedLints> { | ||
| desc { "getting AST lowering delayed lints in `{}`", tcx.def_path_str(key) } | ||
| no_hash |
There was a problem hiding this comment.
By marking the query as no_hash it will always be recomputed, but it is very cheap to rerun, in fact according to my local benchmarks rerunning is cheaper than hashing :3
This comment has been minimized.
This comment has been minimized.
|
r? @GuillaumeGomez |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (172ee0e): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing 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 -2.2%, secondary -1.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.5%, secondary 28.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis perf run didn't have relevant results for this metric. Bootstrap: 491.114s -> 494.706s (0.73%) |
|
|
||
| /// Lints delayed during ast lowering to be emitted | ||
| /// after hir has completely built | ||
| #[stable_hasher(ignore)] |
There was a problem hiding this comment.
Actually but that I'm looking at this diff again I'd like to double check that this line is sound, so please wait with merging
There was a problem hiding this comment.
Looking at it again, I'm actually pretty sure this is not sound :c
The hash of the lints can change without the hash of the HIR itself changing, crazily enough. And if delayed_lints here changes we need to rerun HIR analysis as that is what actually emits the lints, rather than re-using the cached result
|
Well, sounds good to me and that unblocks #154432 so yeay. r=me once you're sure everything is ok on your side too. |
This PR unblocks #154432, and was also a minor perf win locally