-
Notifications
You must be signed in to change notification settings - Fork 183
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
Switch PluralRules Data to ZeroVec #1240
Conversation
Fixes #615. |
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
@Manishearth @sffc - can you skim through for sanity check before I start polishing? |
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.
Looks like you're on the right track so far!
#[derive(Clone, Debug, PartialEq)] | ||
pub struct Relation<'data> { | ||
pub(crate) and_or: AndOr, | ||
pub(crate) polarity: Polarity, |
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.
thought (also a note to self, really): if these are refactored into an AndOrPolarityOperand struct on the non-ULE side and we just implement ULE on that (instead of doing the andor_polarity_operand
field) this becomes something much more amenable to the custom derive that I hope to have
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
I applied Manish feedback and tested using exponent for modulo and cutting @sffc @Manishearth - can I get second round of feedback? After that, I'd like to polish the code and submit for full review. |
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.
A few comments to start; more coming soon
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.
Next round of feedback. I finished runtime/ast.rs which seems to be one of the bigger files.
type Error = &'static str; | ||
|
||
#[inline] | ||
unsafe fn from_byte_slice_unchecked(bytes: &[u8]) -> &Self { |
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.
Request: please verify this impl with @Manishearth
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.
Hehehe I wrote this code but yes I should have a closer look, will mention when I've reviewed
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.
Good! Nothing big, just a few more small things.
Notice: the branch changed across the force-push!
~ Your Friendly Jira-GitHub PR Checker Bot |
I applied the next round of feedback and I think I'm ready to clean up the code, document fix tests and put for full review. But before I do, I noticed something concerning: The performance is good - But the memory is much less affected.
@sffc @Manishearth - is that expected? Is it VZV cost, or should we investigate further? |
Note that those examples use a static data provider so they're both loading all of the data as part of the binary, which is probably where most of that number comes from. |
It would be worth diffing the amount the memory usage increases between the start of |
Hooray! The files in the branch are the same across the force-push. 😃 ~ Your Friendly Jira-GitHub PR Checker Bot |
^^^^^^^^^^^