You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bad trait solving performance with bounds on associated types #6432
A-perfperformance issuesA-tytype system / type inference / traits / method resolutionS-unactionableIssue requires feedback, design decisions or is blocked on other work
A bound like T::Item: Debug can slow down trait solving a lot because it will currently result in a search through all Debug impls (this case will be hit), see e.g. #6362. rust-lang/chalk#589 should solve this, but the changes in rust-lang/chalk#638 should probably also fix it in most cases. At some point, I'd like to remove the above-mentioned unrestricted search case (i.e. return an empty list instead), which would make sure we don't get bad performance at the cost of getting wrong results if we encounter that situation (which we shouldn't).
Reacted by qwertz19281, timkendrickmw, __dil__ and Philipp Mildenberger
A-perfperformance issuesA-tytype system / type inference / traits / method resolutionS-unactionableIssue requires feedback, design decisions or is blocked on other work
Activity
davidbarsky commentedon Feb 9, 2024
I've resurrected syntactic equality in this branch. Those changes, unfortunately, regressed
analysis-stats:With the revived syntactic equality
On the master branch
(note that when I comment out the unbounded search section, inference drops to 130ms.)
ChayimFriedman2 commentedon Jan 12, 2026
Made irrelevant by the switch to the new solver.