-
Notifications
You must be signed in to change notification settings - Fork 71
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
Get serialized size #429
Get serialized size #429
Conversation
Pull Request Test Coverage Report for Build 9037130030Details
💛 - Coveralls |
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.
The new test is a little strange to me but not unreasonable. Seems inefficient but I guess that's ok.
Perhaps I could explain in the test. The sketch reaches capacity for the first time at 2 * K * 15/16, but at that point it is still in exact mode, so the serialized size is not the maximum (theta in not needed in the exact mode). So we need to catch the second time, but some updates will be ignored in the estimation mode, so I updated more than enough times keeping track of the maximum. Perhaps I should have figured out the exact number of updates given this particular sequence, but not assuming that might be even better (say, in case we change the load factor or just out of principle not to rely on implementation details too much). |
Yeah, the test is fine. It just feels sort of overkill to serialize after every update just to check. Not quite an ideal design for quick tests but with lgK=10 it should be ok in practice. |
No description provided.