Skip to content

Add build(long[], int); document hash edge cases; POM fixes - #1

Merged
lemire merged 1 commit into
mainfrom
pom-and-api-fixes
Nov 4, 2026
Merged

lemire merged 1 commit into
mainfrom
pom-and-api-fixes

Conversation

@lemire

@lemire lemire commented Nov 4, 2026

Copy link
Copy Markdown
Member
  • BinaryFuse8/16.build(long[] keys, int length): build from the first length keys of an array (e.g. a partly filled buffer) without copying it. build(long[]) delegates to it.
  • Hash edge cases, documented and tested, hash unchanged. WyHash.hash64(key, seed) multiplies key ^ P0 by seed ^ P1. The key P0 hashes to the same value for every seed; that's harmless, since one key can't make construction fail, and a test covers it. A seed equal to P1 would map every key to the same value; a new test checks that the first MAX_ATTEMPTS seeds of the fixed sequence all differ from P1. Fuse.hash is deliberately unchanged: it is part of serialization format 1, and changing it would make existing filters return false negatives.
  • POM: <scm><url> is now the browsable https://github.com/FastFilter/jbinfuse. A comment explains why the release repository URL points at Maven Central: it's Njord's convention (JavaFastPFOR does the same), and the workflow deploys through Njord.

Compatibility: filters built by this branch are byte-identical to 0.0.1's (checked by SHA-256 over 8-bit and 16-bit filters for n = 0…2,000,000, including inputs with duplicates).

Tests: 33 pass on JDK 21 (./mvnw verify), up from 30.

- BinaryFuse8/16.build(long[] keys, int length) builds from a prefix of
  the array without copying it.
- Document the two degenerate inputs of WyHash.hash64(key, seed) and test
  that the fixed seed sequence never produces the degenerate seed. The
  hash itself is unchanged: it is part of serialization format 1.
- pom.xml: <scm><url> is now the browsable GitHub URL; explain why the
  release repository URL points at Maven Central (Njord convention).

Filters are byte-identical to those built by 0.0.1.
@lemire
lemire merged commit baef3ac into main Nov 4, 2026
6 checks passed
@lemire
lemire deleted the pom-and-api-fixes branch November 4, 2026 03:21
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.

1 participant