Conversation
This comment has been minimized.
This comment has been minimized.
|
@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.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (0182a57): comparison URL. Overall result: ❌ regressions - 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 0.3%, secondary 1.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 6.3%)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: 482.035s -> 481.186s (-0.18%) |
|
Should we remove |
|
I’m surprised that this doesn’t have a big perf impact, though as you say, that’s probably because we end up promoting the values from disk later on anyway. The way that we currently do promotion seems like it has room for improvement, so it might be prudent to leave |
|
I'm always sympathetic to the idea of removing unnecessary stuff :) Is there a meaningful difference between The comment on That sounds like partly an efficiency concern and partly a behavioural concern (the "guarantee" part). But I don't know if that comment is accurate. E.g. for the @Zoxc, do you know who introduced |
|
The split between I introduced the current names and docs in #136279. |
In several (most?) cases, the query used with Anything that inspects THIR or MIR has a reasonable chance of falling into this category, for example. |
|
Yea I'd expect we'll need it for turning promoteds into their own items. But we can reintroduce this when needed Just need to make sure we don't need it soon for https://github.com/rust-lang/rust/pull/153489/changes#diff-ad0c15bbde97a607d4758ec7eaf88248be5d6b8ae084dfc84127f81e3f7a9bb4R636 |
This comment has been minimized.
This comment has been minimized.
|
I've removed the |
|
r? @fmease rustbot has assigned @fmease. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
Curious. This removes 100% of cache hits of thir_abstract_const in various incremental patched tests I looked at. I don't know how to interpret that result, but it's not a perf issue anyway |
|
|
The question of whether to leave However, I do think it's ultimately useful to have an explicit marker for query calls that don't care about the return value, even if the marker currently (after this PR) makes no operational difference. At the very least it's a lot more searchable than |
The problem is, how do we ensure that everyone uses If we really wanted to distinguish queries were could do something like put a |
This comment has been minimized.
This comment has been minimized.
| /// Shared implementation of `tcx.$query(..)`, `tcx.at(span).$query(..)` and | ||
| /// `tcx.ensure_done().$query(..)` for all queries. | ||
| #[inline(always)] | ||
| pub(crate) fn query_get_at<'tcx, C>( |
There was a problem hiding this comment.
This should be renamed query_get_or_ensure_done. (I think the at can be dropped because it's low-value and QueryMode doesn't have it.)
| /// Corresponds to [`TyCtxt::ensure_done`]. | ||
| Done, | ||
| /// This is a call to `tcx.ensure_ok().$query(..)`. | ||
| Ensure, |
There was a problem hiding this comment.
The variants should be named GetOrEnsureDone and EnsureOk. (A bit clumsy but extremely clear.)
There was a problem hiding this comment.
I think GetOrEnsureDone is more misleading.
It's not a get-or-ensure-done mode; it's a get mode that ensure-done delegates to because it currently doesn't have a specialized path of its own.
|
r? @Zalathar |
|
|
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
View all comments
This removes the
ensure_doneexecution path as it doesn't have a performance impact.ensure_donecalls are left as markers still.