diff options
| author | Jonas Schievink <jonasschievink@gmail.com> | 2016-10-17 02:28:31 +0200 |
|---|---|---|
| committer | Jonas Schievink <jonasschievink@gmail.com> | 2016-10-17 02:28:31 +0200 |
| commit | 88fde7f728612252eef9624a40b3b3f7868309f1 (patch) | |
| tree | 7977e785470e293f2741a12ac9a81c75a2673237 /src/librustc_data_structures | |
| parent | 6dc035ed911672c6a1f7afc9eed15fb08e574e5b (diff) | |
| download | rust-88fde7f728612252eef9624a40b3b3f7868309f1.tar.gz rust-88fde7f728612252eef9624a40b3b3f7868309f1.zip | |
Don't process cycles when stalled
This improves the `inflate-0.1.0` benchmark by about 10% for me.
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/obligation_forest/mod.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/librustc_data_structures/obligation_forest/mod.rs b/src/librustc_data_structures/obligation_forest/mod.rs index c079146edbf..fb2d3291a60 100644 --- a/src/librustc_data_structures/obligation_forest/mod.rs +++ b/src/librustc_data_structures/obligation_forest/mod.rs @@ -342,6 +342,16 @@ impl<O: ForestObligation> ObligationForest<O> { } } + if stalled { + // There's no need to perform marking, cycle processing and compression when nothing + // changed. + return Outcome { + completed: vec![], + errors: errors, + stalled: stalled, + }; + } + self.mark_as_waiting(); self.process_cycles(processor); |
