Uh oh!
There was an error while loading. Please reload this page.
Avoid nondeterminism in trimmed_def_paths - #89408
Conversation
Previously this query depended on the global interning order of Symbols, which meant that irrelevant changes could influence the query and cause recompilations. This commit ensures that the return set is stable and will not be affected by the global order by deterministically (in lexicographic order) choosing a name to use if there are multiple names for a single DefId.
rust-highfive
commented
Sep 30, 2021
(rust-highfive has picked a reviewer for you, use r? to override) |
Mark-Simulacrum
commented
Sep 30, 2021
@bors try @rust-timer queue |
rust-timer
commented
Sep 30, 2021
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
bors
commented
Sep 30, 2021
⌛ Trying commit 56fcf07 with merge bde948fea1e2e10b64d5edf9ca9c1aba01f2da10... |
Mark-Simulacrum
commented
Sep 30, 2021
(Nondeterminism is maybe not the right name -- a specific compilation should always be the same. But "irrelevant" changes can cause the behavior of this query to differ, which seems not great). |
bors
commented
Sep 30, 2021
☀️ Try build successful - checks-actions |
rust-timer
commented
Sep 30, 2021
Queued bde948fea1e2e10b64d5edf9ca9c1aba01f2da10 with parent 6dc08b9, future comparison URL. |
tgnottingham
commented
Sep 30, 2021
Seems like a good idea. Outside the scope of this, but it might be nice if trimmed paths in error messages used the most appropriate name when there are multiple possibilities, taking into account any |
rust-timer
commented
Sep 30, 2021
Finished benchmarking commit (bde948fea1e2e10b64d5edf9ca9c1aba01f2da10): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. 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 led to changes in compiler perf. @bors rollup=never |
rylev
commented
Oct 1, 2021
This indeed seems to fix the performance regressions we saw previously! 🎉 |
petrochenkov
commented
Oct 1, 2021
@bors r+ |
bors
commented
Oct 1, 2021
📌 Commit 56fcf07 has been approved by |
bors
commented
Oct 2, 2021
bors
commented
Oct 2, 2021
☀️ Test successful - checks-actions |
rust-timer
commented
Oct 2, 2021
Finished benchmarking commit (edebf77): comparison url. Summary: This benchmark run did not return any relevant changes. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Previously this query depended on the global interning order of Symbols, which
meant that irrelevant changes could influence the query and cause
recompilations. This commit ensures that the return set is stable and will not
be affected by the global order by deterministically (in lexicographic order)
choosing a name to use if there are multiple names for a single DefId.
This should fix the cause of the regressions in #83343.