Bad trait solving performance with bounds on associated types #6432
Labels
A-perf
performance issues
A-ty
type system / type inference / traits / method resolution
S-unactionable
Issue 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 allDebug
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).
The text was updated successfully, but these errors were encountered: