<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/librustc_data_structures/obligation_forest, branch 1.41.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.41.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.41.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2020-01-23T21:08:12+00:00</updated>
<entry>
<title>Revert parts of #66405.</title>
<updated>2020-01-23T21:08:12+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-12-20T23:53:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6a835ea8658be7c8f3109503dbbf7f90a60a3eb2'/>
<id>urn:sha1:6a835ea8658be7c8f3109503dbbf7f90a60a3eb2</id>
<content type='text'>
Because it caused major performance regressions in some cases.

That PR had five commits, two of which affected performance, and three
of which were refactorings. This change undoes the performance-affecting
changes, while keeping the refactorings in place.

Fixes #67454.
</content>
</entry>
<entry>
<title>fmt data data structures</title>
<updated>2020-01-23T21:08:09+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2020-01-23T21:08:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=5d4b63926fe1eea0d36828c05693a91a0dd2fc15'/>
<id>urn:sha1:5d4b63926fe1eea0d36828c05693a91a0dd2fc15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Avoid re-processing nodes in `find_cycles_from_node`.</title>
<updated>2019-12-12T21:36:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-12-09T03:51:59+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=cb212938d424a94695e35bb92e20613a2af72a0f'/>
<id>urn:sha1:cb212938d424a94695e35bb92e20613a2af72a0f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove an unnecessary local variable.</title>
<updated>2019-12-12T21:36:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-12-06T02:41:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=76916d7a4b948119de05135e8d797cf0d40bfd58'/>
<id>urn:sha1:76916d7a4b948119de05135e8d797cf0d40bfd58</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove some `debug!` statements.</title>
<updated>2019-12-12T21:36:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-12-06T02:37:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4ec87d5cd2024492faaa11bd121d39b943710357'/>
<id>urn:sha1:4ec87d5cd2024492faaa11bd121d39b943710357</id>
<content type='text'>
Because I am tired of looking at them.
</content>
</entry>
<entry>
<title>Move functions around.</title>
<updated>2019-12-12T21:36:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-12-06T02:31:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7d550445e2b650ec198ef1c6de19612f0dc6287e'/>
<id>urn:sha1:7d550445e2b650ec198ef1c6de19612f0dc6287e</id>
<content type='text'>
In particular, it has bugged me for some time that `process_cycles` is
currently located before `mark_still_waiting_nodes` despite being called
afterwards.
</content>
</entry>
<entry>
<title>Remove `NodeState::{Waiting,Done}`.</title>
<updated>2019-12-12T21:36:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-11-12T21:35:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a8207b195840fc664ffc4a9c033cd3ee0746ea2e'/>
<id>urn:sha1:a8207b195840fc664ffc4a9c033cd3ee0746ea2e</id>
<content type='text'>
`NodeState` has two states, `Success` and `Done`, that are only used
within `ObligationForest` methods. This commit removes them, and renames
the existing `Waiting` state as `Success`.

We are left with three states: `Pending`, `Success`, and `Error`.
`Success` is augmented with a new `WaitingState`, which indicates when
(if ever) it was last waiting on one or more `Pending` nodes. This
notion of "when" requires adding a "process generation" to
`ObligationForest`; it is incremented on each call to
`process_obligtions`.

This commit is a performance win.

- Most of the benefit comes from `mark_as_waiting` (which the commit
  renames as `mark_still_waiting_nodes`). This function used to do two
  things: (a) change all `Waiting` nodes to `Success`, and (b) mark all
  nodes that depend on a pending node as `Waiting`. In practice, many
  nodes went from `Waiting` to `Success` and then immediately back to
  `Waiting`. The use of generations lets us skip step (a).

- A smaller benefit comes from not having to change nodes to the `Done`
  state in `process_cycles`.
</content>
</entry>
<entry>
<title>Make `process_obligations()` greedier.</title>
<updated>2019-11-14T21:33:39+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-11-14T06:21:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=05f13a843370995181904ec961a7920eea9ae7bb'/>
<id>urn:sha1:05f13a843370995181904ec961a7920eea9ae7bb</id>
<content type='text'>
`process_obligations()` adds new nodes, but it does not process these
new nodes until the next time it is called.

This commit changes it so that it does process these new nodes within
the same call. This change reduces the number of calls to
`process_obligations()` required to complete processing, sometimes
giving significant speed-ups.

The change required some changes to tests.
- The output of `cycle-cache-err-60010.rs` is slightly different.
- The unit tests required extra cases to handle the earlier processing
  of the added nodes. I mostly did these in the simplest possible way,
  by making the added nodes be ignored, thus giving outcomes the same as
  with the old behaviour. But I changed `success_in_grandchildren()`
  more extensively so that some obligations are completed earlier than
  they used to be.
</content>
</entry>
<entry>
<title>Rollup merge of #64805 - nnethercote:ObligForest-still-more, r=nikomatsakis</title>
<updated>2019-10-02T06:06:14+00:00</updated>
<author>
<name>Tyler Mandry</name>
<email>tmandry@gmail.com</email>
</author>
<published>2019-10-02T06:06:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0e88e56a9a535bc0bf3b6c88f08a67ac33589c4a'/>
<id>urn:sha1:0e88e56a9a535bc0bf3b6c88f08a67ac33589c4a</id>
<content type='text'>
Still more `ObligationForest` improvements.

Following on from #64627, more readability improvements, but negligible effects on speed.

r? @nikomatsakis
</content>
</entry>
<entry>
<title>Avoid the popping loop at the end of `compress()`.</title>
<updated>2019-09-29T19:25:25+00:00</updated>
<author>
<name>Nicholas Nethercote</name>
<email>nnethercote@mozilla.com</email>
</author>
<published>2019-09-26T04:18:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a820672f6c947c5f487d10a011b9b1e65c29f693'/>
<id>urn:sha1:a820672f6c947c5f487d10a011b9b1e65c29f693</id>
<content type='text'>
By collecting the done obligations (when necessary) in the main loop.
This makes the code cleaner.

The commit also changes the order in which successful obligations are
returned -- they are now returned in the registered order, rather than
reversed. Because this order doesn't actually matter, being only used by
tests, the commit uses `sort()` to make the test agnostic w.r.t. the
order.
</content>
</entry>
</feed>
