NLL exponential(?) increase in compile times when nesting borrowed futures #61324
Labels
A-borrow-checker
Area: The borrow checker
A-NLL
Area: Non-lexical lifetimes (NLL)
C-bug
Category: This is a bug.
I-compiletime
Issue: Problems and improvements with respect to compile times.
NLL-performant
Working towards the "performance is good" goal
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
When nesting futures in the pattern:
I get a blow up in complation times at around n = 10 or 11.
N = 9 takes 15 seconds, N = 10 takes 83 seconds, and N = 11 takes 18 minutes.
Switching things to the static lifetime make the times reasonable again.
Playground link showing the full example: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=136faa5e507b53e587480d23f9fc87d8
It happens on both nightly and stable. I ran with
cargo rustc -- -Z time-passes
and got:The text was updated successfully, but these errors were encountered: