Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove support for congruence closure computation #6

Merged
merged 1 commit into from
Feb 9, 2018

Conversation

nikomatsakis
Copy link
Contributor

@nikomatsakis nikomatsakis commented Feb 9, 2018

Supporting congruence closure requires the unioned_keys iterator,
which in turn requires maintaining the parent/sibling pointers. This
grows the size of nodes, which in turn leads to a 2% slowdown in
various rustc test cases (e.g., the coercions benchmark in
perf.rust-lang.org). Given that this feature is not used in chalk or
anywhere else, no reason to support it.

Cargo bench measurements (3 runs each):

before
test unify::tests::big_array_bench_InPlace ... bench: 1,335,817 ns/iter
test unify::tests::big_array_bench_InPlace ... bench: 1,030,749 ns/iter
test unify::tests::big_array_bench_InPlace ... bench: 1,339,391 ns/iter

after
test unify::tests::big_array_bench_InPlace ... bench: 918,518 ns/iter
test unify::tests::big_array_bench_InPlace ... bench: 1,190,575 ns/iter
test unify::tests::big_array_bench_InPlace ... bench: 918,214 ns/iter

A bit uneven but clearly a win.

Copy link

@sgrif sgrif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥

src/lib.rs Outdated
pub mod unify;

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✂️

src/unify/mod.rs Outdated
self.rank = rank;
self.child = child;
// self.child = child;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just kill it instead of commenting it out?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops

src/unify/mod.rs Outdated
@@ -397,7 +370,7 @@ impl<S: UnificationStore> UnificationTable<S> {
}
}

/// Internal method to redirect `old_root_key` (which is currently
/// Internal method tox redirect `old_root_key` (which is currently
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you meant to commit this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you...are right

@nikomatsakis nikomatsakis force-pushed the ndm-kill-cc branch 2 times, most recently from becbefd to 277afc0 Compare February 9, 2018 22:50
Supporting congruence closure requires the `unioned_keys` iterator,
which in turn requires maintaining the parent/sibling pointers. This
grows the size of nodes, which in turn leads to a 2% slowdown in
various rustc test cases (e.g., the `coercions` benchmark in
perf.rust-lang.org). Given that this feature is not used in chalk or
anywhere else, no reason to support it.
@nikomatsakis
Copy link
Contributor Author

Grr travis you take too long

@nikomatsakis nikomatsakis merged commit 52cd081 into master Feb 9, 2018
@nikomatsakis nikomatsakis deleted the ndm-kill-cc branch February 9, 2018 23:50
lorenzleutgeb added a commit to lorenzleutgeb/ena that referenced this pull request Apr 26, 2022
Removes just the declaration and the corresponding dependency
from `Cargo.toml`. The code that was once guarded by this feature
was removed years ago.

See 52cd081
See rust-lang#6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants