Chronicle Software
- Factories
-
LongHashFunction.city_1_1(),.city_1_1(long),.city_1_1(long, long)(LongHashFunction.java:53-115). - Implementation
-
net.openhft.hashing.CityAndFarmHash_1_1ports Google’s CityHash64 v1.1 (CityAndFarmHash_1_1.java). - Key traits
-
-
Normalises inputs to little-endian and forwards short-length cases to specialised mix routines (1–3, 4–7, 8–16 byte fast paths).
-
Produces identical output across host endianness; big-endian incurs the expected byte swapping cost.
-
Provides seedless, single-seed, and dual-seed variants mirroring the upstream API.
-
- Factories
-
LongHashFunction.farmNa(),.farmNa(long),.farmNa(long, long)(LongHashFunction.java:117-179). - Implementation
-
Shares
CityAndFarmHash_1_1with CityHash; the class carries thefarmhashnalogic, including the <32 byte shortcut to CityHash output. - Key traits
-
-
Deterministic across endianness; the mixing rounds assume little-endian inputs and convert when necessary.
-
Seeds map directly onto the upstream
farmhashnaparameters.
-
- Factories
-
LongHashFunction.farmUo(),.farmUo(long),.farmUo(long, long)(LongHashFunction.java:181-243). - Implementation
-
Also hosted in
CityAndFarmHash_1_1, which covers the 1.1 update’s longer pipelines. - Key traits
-
-
Maintains parity with Google’s C++ release for test vectors.
-
Endianness neutral: always routes through an
Accessview that matches the algorithm’s little-endian assumptions.
-
- Factories
-
LongHashFunction.murmur_3(),.murmur_3(long)for 64-bit (LongHashFunction.java:245-268);LongTupleHashFunction.murmur_3(),.murmur_3(long)for 128-bit (LongTupleHashFunction.java:35-69). - Implementation
-
net.openhft.hashing.MurmurHash_3adapts Austin Appleby’s x64 variants. It extendsDualHashFunctionso the 128-bit engine also exposes the low 64 bits throughLongHashFunction. - Key traits
-
-
Little-endian canonicalisation via
Access.byteOrder. -
Supports zero-length hashing through pre-computed constants to keep
hashVoid()stable.
-
- Factories
-
LongHashFunction.xx(),.xx(long)(LongHashFunction.java:270-298). - Implementation
-
net.openhft.hashing.XxHashports the official XXH64 reference and keeps the unsigned prime constants as signed Java longs. - Key traits
-
-
Uses four-lane accumulation for ≥32 byte inputs, matching upstream behaviour bit-for-bit.
-
Applies the canonical avalanche round in
XxHash.finalizefor all lengths. -
Seeded and seedless instances differ only by the stored
seed()override; serialisation preserves both forms.
-
- Factories
-
LongHashFunction.xx3(),.xx3(long)for 64-bit, plus.xx128low()/.xx128low(long)for the low 64 bits of XXH128 (LongHashFunction.java:300-341). Full 128-bit results live behindLongTupleHashFunction.xx128()and.xx128(long)(LongTupleHashFunction.java:71-104). - Implementation
-
net.openhft.hashing.XXH3keeps the FARSH-derived 192 byte secret and streaming logic. It defines distinct entry points for 64-bit, 128-bit, and low-64-bit projections. - Key traits
-
-
Optimises for short messages with dedicated 1–3, 4–8, 9–16, 17–128, and 129–240 byte paths.
-
Uses
UnsafeAccess.INSTANCE.byteOrder(null, LITTLE_ENDIAN)once to avoid per-call adapter allocation. -
The 128-bit variant reuses the same mixing core; exposing the low 64 bits avoids extra copies for callers that only need a single
long.
-
- Factories
-
LongHashFunction.wy_3(),.wy_3(long)(LongHashFunction.java:343-369). - Implementation
-
net.openhft.hashing.WyHashmirrors Wang Yi’s version 3 reference, including the_wymum128-bit multiply-fold helper built onMaths.unsignedLongMulXorFold. - Key traits
-
-
Supports streaming chunks up to 256 bytes per loop iteration; beyond that it accumulates in 32 byte strides.
-
Handles ≤3, ≤8, ≤16, ≤24, ≤32 byte inputs with the same branching as the C code.
-
Maintains deterministic output across architectures while acknowledging the performance hit on big-endian systems.
-
- Factories
-
LongHashFunction.metro(),.metro(long)(LongHashFunction.java:371-389). - Implementation
-
net.openhft.hashing.MetroHashimplements the 64-bit metrohash variant with the_2initialisation vector, matching the original author’s reference. - Key traits
-
-
Performs four-lane unrolled mixing for ≥32 byte inputs and cascades down to 16, 8, 4, 2, and 1 byte tails.
-
Uses deterministic finalisation (
MetroHash.finalize) shared by scalar and streaming paths. -
Seeded instances override
seed()and cache the pre-hashedhashVoid()constant to avoid re-computation.
-