Skip to content

Conversation

@proost
Copy link
Contributor

@proost proost commented Dec 12, 2025

Sorry for big change.

Because of vacation about two weeks, so I send big PR.

feedbacks will be applied after vacation.

After merged, I will upload benchmark to datasketches-characterization like theta sketch.

@freakyzoidberg
Copy link
Member

No worries, I'll try doing the review today.

Enjoy your vacation anyway !

Thanks


if ordered && !a.IsOrdered() {
slices.SortFunc(entries, func(a, b entry[S]) int {
return int(a.Hash - b.Hash)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could overflow/underflow, safer to just compare them

  ..., func(a, b entry[S]) int {
      if a.Hash < b.Hash {
          return -1
      } else if a.Hash > b.Hash {
          return 1
      }
      return 0
  }


if ordered && !a.IsOrdered() {
slices.SortFunc(entries, func(a, b entry[S]) int {
return int(a.Hash - b.Hash)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same underflow as above

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants