Quadratic (or worse) compile time with extremely borrowed type #103421
Labels
C-bug
Category: This is a bug.
I-compiletime
Issue: Problems and improvements with respect to compile times.
This pattern compiles faster now that #103214 has merged, but it's still slower than I'd like.
Time complexity
Seems worse than quadratic but better than cubic.
Which passes are slow
Over half the time is in
MIR_borrow_checking
, withwf_checking
andtype_check_crate
also contributing substantially.Output with -Z time-passes (4000x reference type; 85 seconds)
Impact on my fuzzing
Low. While compile time is quadratic, the constant factor is small. The fuzzer usually keeps inputs under 4096 total bytes. I can skip fuzz-generated testcases that have over 400 ampersand characters without losing much coverage.
Limits
Should there be a limit on levels of nesting
&
in types and expressions? Maybe therecursion_limit
crate attribute should apply.Meta
rustc --version --verbose
:@rustbot label +I-compiletime
The text was updated successfully, but these errors were encountered: