FastFilter / fastfilter_java

Fast Approximate Membership Filters (Java)
Apache License 2.0
238 stars 27 forks source link

Cleanup XorPlus8 + guard against infinite loop in table construction #30

Closed steve-scalyr closed 2 years ago

steve-scalyr commented 2 years ago

This PR contains some minor changes to the XorPlus8 class:

Regarding the unused constructor that I removed: it did not populate seed or rank, and I believe the latter means that any attempt to use the instance created by this constructor would have resulted in NullPointerException.

The changes are small, but can most easily be reviewed one commit at a time.

steve-scalyr commented 2 years ago

@thomasmueller could you take a look? This PR contains the infinite loop guard proposed in the discussion of https://github.com/FastFilter/fastfilter_java/pull/30. I also took the opportunity to read through the code to make sure I understood all of it, and along the way I made a few other small changes.

steve-scalyr commented 2 years ago

Thanks!

One last request: would it be possible to publish a new release (1.0.3) now?