You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@datasketches.apache.org by "proost (via GitHub)" <gi...@apache.org> on 2025/09/27 09:18:54 UTC
[PR] perf: reduce calling hashing function [datasketches-go]
proost opened a new pull request, #46:
URL: https://github.com/apache/datasketches-go/pull/46
call hash function once.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] perf: reduce calling hashing function [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on PR #46:
URL: https://github.com/apache/datasketches-go/pull/46#issuecomment-3345998198
Thanks !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] perf: reduce calling hashing function [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on code in PR #46:
URL: https://github.com/apache/datasketches-go/pull/46#discussion_r2385340238
##########
frequencies/items_sketch.go:
##########
@@ -243,6 +244,23 @@ func (i *ItemsSketch[C]) GetUpperBound(item C) (int64, error) {
return v + i.offset, err
}
+// frequencies return estimated frequency, lower bound frequency,
+// upper bound frequency at once.
+func (i *ItemsSketch[C]) frequencies(item C) (est, lower, upper int64, err error) {
Review Comment:
Do you mind adding a test confirming equivalent with the public GetEstimate/GetLowerBound/etc - as this logic is now effectively in two places.
Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] perf: reduce calling hashing function [datasketches-go]
Posted by "proost (via GitHub)" <gi...@apache.org>.
proost commented on code in PR #46:
URL: https://github.com/apache/datasketches-go/pull/46#discussion_r2386100829
##########
frequencies/items_sketch.go:
##########
@@ -243,6 +244,23 @@ func (i *ItemsSketch[C]) GetUpperBound(item C) (int64, error) {
return v + i.offset, err
}
+// frequencies return estimated frequency, lower bound frequency,
+// upper bound frequency at once.
+func (i *ItemsSketch[C]) frequencies(item C) (est, lower, upper int64, err error) {
Review Comment:
[4b48e4d](https://github.com/apache/datasketches-go/pull/46/commits/4b48e4dd048558e44ef45b4e74e711cf589f6620)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] perf: reduce calling hashing function [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg merged PR #46:
URL: https://github.com/apache/datasketches-go/pull/46
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org
Re: [PR] perf: reduce calling hashing function [datasketches-go]
Posted by "freakyzoidberg (via GitHub)" <gi...@apache.org>.
freakyzoidberg commented on code in PR #46:
URL: https://github.com/apache/datasketches-go/pull/46#discussion_r2385340238
##########
frequencies/items_sketch.go:
##########
@@ -243,6 +244,23 @@ func (i *ItemsSketch[C]) GetUpperBound(item C) (int64, error) {
return v + i.offset, err
}
+// frequencies return estimated frequency, lower bound frequency,
+// upper bound frequency at once.
+func (i *ItemsSketch[C]) frequencies(item C) (est, lower, upper int64, err error) {
Review Comment:
Do you mind adding a test confirming equality with the public GetEstimate/GetLowerBound/etc - as this logic is now effectively in two places.
Thanks
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@datasketches.apache.org
For additional commands, e-mail: dev-help@datasketches.apache.org