-
Notifications
You must be signed in to change notification settings - Fork 10
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
Fix asymptotics of BasePattern #81
Fix asymptotics of BasePattern #81
Conversation
Can be rebased now. CI failure is "real" (cargo fmt). Nice! |
b67a5d3
to
25f8109
Compare
Rebased |
@@ -206,40 +206,31 @@ impl BasePattern { | |||
} | |||
} | |||
|
|||
/// Check if the `identifier` is contained inside the pattern. | |||
pub fn contains(&self, identifier: &Identifier) -> bool { |
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.
In 25f8109:
Might as well keep this method, though it can just be a oneliner self.get(identifier).is_some()
.
In 25f8109: The commit messages says the existing method was |
Improve the asymptotics of BasePattern::get and of BasePattern::contains_all to O(n).
25f8109
to
8f3c948
Compare
Addressed the comments |
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.
ACK 8f3c948 successfully ran local tests
Depends on #80 (because of the inference context parameters)
Fixes #39 Fixes #40