-
Notifications
You must be signed in to change notification settings - Fork 35
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
Conversation
There was a problem hiding this 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; | ||
|
There was a problem hiding this comment.
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; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you...are right
becbefd
to
277afc0
Compare
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.
277afc0
to
d0a8975
Compare
Grr travis you take too long |
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
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 inperf.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.