Repository navigation
polymorphic_recursion.rs takes longer to compile #120912
Description
Activity
- addedC-bugCategory: This is a bug.Category: This is a bug.regression-untriagedUntriaged performance or correctness regression.Untriaged performance or correctness regression.
on Feb 11, 2024 - addedI-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}needs-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Feb 11, 2024 @dianqk: Why did you title this "is broken"? It just takes longer to compile, or is it broken some other way?
I'll look into the upcoming week.
@dianqk: Why did you title this "is broken"? It just takes longer to compile, or is it broken some other way?
I'll look into the upcoming week.
Sorry, it just takes longer to compile.
- changed the title
[-]`polymorphic_recursion.rs` is broken[/-][+]`polymorphic_recursion.rs` takes longer to compile[/+]on Feb 11, 2024 - addedI-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.and removedneeds-triageThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triagingThis issue may need triage. Remove when done. See docs forge.rust-lang.org/release/issue-triaging
on Feb 11, 2024 WG-prioritization assigning priority (Zulip discussion).
@rustbot label -I-prioritize +P-medium -regression-untriaged
- addedP-mediumMedium priorityMedium priorityand removedI-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}Issue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}regression-untriagedUntriaged performance or correctness regression.Untriaged performance or correctness regression.
on Feb 12, 2024 - added a commit that references this issue
on Feb 13, 2024 On my machine (Apple M2 Pro), this test currently takes about 30 seconds.
But if I enable
[rust] debug-assertions = true, the compiler appears to consume 100% CPU forever.I'm not sure whether it's actually stuck, or just taking an incredibly long time, but I've never seen it finish with debug assertions enabled.
If I apply #120942, the test finishes in about 45 seconds with debug assertions enabled, and about 3 seconds with them disabled.
- added a commit that references this issue
on Feb 14, 2024
Code
I tried this code:
https://github.com/rust-lang/rust/blob/1.76.0/tests/mir-opt/inline/polymorphic_recursion.rs
I expected to see this happen: It compiles quickly.
Instead, this happened: It takes 10s to complete.
Version with regression
Bisected to #120584.
cc @compiler-errors