[#68] Document Murmur3 64-bit seed semantics and C++ interoperability - #120
Open
peter-lawrey wants to merge 3 commits into
Open
[#68] Document Murmur3 64-bit seed semantics and C++ interoperability#120peter-lawrey wants to merge 3 commits into
peter-lawrey wants to merge 3 commits into
Conversation
The C++ reference accepts uint32_t while the established Java API uses all 64 bits of its long seed. Changing that behaviour would alter existing hash values. Document both public facades and add independent boundary vectors without changing production behaviour.
peter-lawrey
force-pushed
the
docs/Zero-Allocation-Hashing-68-javadoc-note-c-parity-is-for-uint3
branch
from
August 21, 2026 14:11
aa8e611 to
9a4536e
Compare
peter-lawrey
marked this pull request as ready for review
August 21, 2026 14:16
tgd
approved these changes
Aug 26, 2026
The Build job failed during setup because both cache steps used the retired cache v1 service. The checkout and Java setup actions also used obsolete runtimes, and the SonarCloud scanner engine now requires Java 21. Upgrade checkout, Java setup and both cache steps to v4, select Zulu JDK 21 explicitly and document the CI runtime. Preserve the Java 8 bytecode target and existing cache keys. Validate with actionlint 1.7.12 and mvn -B clean verify -Psonar on JDK 11 and 21. Each build runs 14,904 tests twice, with zero failures or errors and 5/8 skips for the respective string configurations.
The repaired run passed setup and the Maven build, but GitHub reported that the v4 actions use deprecated Node 20 runtimes and setup-java v4 no longer receives updates. Use checkout v7, setup-java v6 and cache v6, whose documented inputs preserve this workflow configuration. Actionlint 1.7.12 and git diff --check pass.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
murmur_3(long)uses all 64 bits of its seed.uint32_tseed and the same input byte sequence.intwithInteger.toUnsignedLong.0x80000000and0xffffffffboundaries,checking both output words and the 64-bit API's first-word result.
Why
The C++
MurmurHash3_x64_128reference accepts auint32_tseed, while thislibrary has historically accepted and used a full Java
long. Masking theexisting parameter would change established hash values, including potentially
persisted values, so this PR clarifies the contract without changing behaviour.
An
intoverload is deliberately not added: existing source calls such asmurmur_3(-1)currently bind to thelongoverload. A new overload withzero-extension semantics would silently change their result after recompilation
while existing binaries retained the old result.
Validation
mvn -B clean verifyAppleby's C++
MurmurHash3_x64_128reference implementationgit diff --checkFixes #68