-
Notifications
You must be signed in to change notification settings - Fork 22
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
Paginated store #30
Paginated store #30
Conversation
6de3b58
to
cf1e5bb
Compare
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 good. Only some minor questions.
src/main/java/com/datadoghq/sketch/ddsketch/store/PaginatedStore.java
Outdated
Show resolved
Hide resolved
src/main/java/com/datadoghq/sketch/ddsketch/store/PaginatedStore.java
Outdated
Show resolved
Hide resolved
src/main/java/com/datadoghq/sketch/ddsketch/store/PaginatedStore.java
Outdated
Show resolved
Hide resolved
src/main/java/com/datadoghq/sketch/ddsketch/store/PaginatedStore.java
Outdated
Show resolved
Hide resolved
src/main/java/com/datadoghq/sketch/ddsketch/store/PaginatedStore.java
Outdated
Show resolved
Hide resolved
9fde60b
to
08e6d7a
Compare
* @param relativeAccuracy the relative accuracy guaranteed by the sketch | ||
* @return a fast instance of {@code DDSketch} | ||
*/ | ||
public static DDSketch fastPaginated(double relativeAccuracy) { |
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 merged #28, which moves preset sketches to DDSketches
and tries to use more explicit method names. Should we go for bitwiseLinearlyInterpolatedPaginated
maybe?
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.
Sounds good. I just rebased, perhaps we can leave it as is because the constructors allow composition for now, and, as discussed, this store doesn't come without costs for very small sketches.
99f6d9a
to
0c04635
Compare
What does this PR do?
This PR provides a store which avoids storing ranges of zeros by storing counts in a paginated array.
Motivation
To reduce worst case footprint when data is bimodal leading to large ranges of zeros, without affecting (or needing to reason about) relative error.
Additional Notes
I don't expect to merge this as is, because the postive-only sketch is being removed and I need somewhere to put the factory method, so expect to rebase against #28 during a review.
This can have a sizeable impact on footprint:
It would also be simple to implement a much faster merge routine which could be vectorized by Hotspot/C2 in
PaginatedStore
which I may contribute at a later date (but I don't immediately need faster aggregation).