Hashing#fingerprint2011
for information on the behaviour of the algorithm.
On Intel Core2 2.66, on 1000 bytes, fingerprint2011 takes 0.9 microseconds compared to fingerprint at 4.0 microseconds and md5 at 4.5 microseconds.
Note to maintainers: This implementation relies on signed arithmetic being bit-wise equivalent to unsigned arithmetic in all cases except:
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final HashFunction | |
| private static final long | |
| private static final long | |
| private static final long | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public int | bits()
Implements com. |
| pack-priv static long | |
| private static long | |
| pack-priv static long | |
| public HashCode | hashBytes(byte[] input, int off, int len)
Implements abstract com. Implements com. newHasher().putBytes(input, off, len).hash().
|
| private static long | |
| pack-priv static long | |
| private static long | |
| public String | |
| private static void | weakHashLength32WithSeeds(byte[] bytes, int offset, long seedA, long seedB, long[] output)
Computes intermediate hash of 32 bytes of byte array from the given offset. |
| FINGERPRINT_2011 | back to summary |
|---|---|
| pack-priv static final HashFunction FINGERPRINT_2011 | |
| K0 | back to summary |
|---|---|
| private static final long K0 | |
| K1 | back to summary |
|---|---|
| private static final long K1 | |
| K2 | back to summary |
|---|---|
| private static final long K2 | |
| K3 | back to summary |
|---|---|
| private static final long K3 | |
| Fingerprint2011 | back to summary |
|---|---|
| pack-priv Fingerprint2011() | |
| bits | back to summary |
|---|---|
| public int bits() Implements com. Doc from com. Returns the number of bits (a multiple of 32) that each hash code produced by this hash function has.
| |
| fingerprint | back to summary |
|---|---|
pack-priv static long fingerprint(byte[] bytes, int offset, int length)
| |
| fullFingerprint | back to summary |
|---|---|
| private static long fullFingerprint(byte[] bytes, int offset, int length) | |
| hash128to64 | back to summary |
|---|---|
| pack-priv static long hash128to64(long high, long low) Implementation of Hash128to64 from util/hash/hash128to64.h
| |
| hashBytes | back to summary |
|---|---|
| public HashCode hashBytes(byte[] input, int off, int len) Implements abstract com. Implements com. Doc from com. Shortcut for
| |
| hashLength33To64 | back to summary |
|---|---|
| private static long hashLength33To64(byte[] bytes, int offset, int length) | |
| murmurHash64WithSeed | back to summary |
|---|---|
pack-priv static long murmurHash64WithSeed(byte[] bytes, int offset, int length, long seed)
| |
| shiftMix | back to summary |
|---|---|
| private static long shiftMix(long val) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| weakHashLength32WithSeeds | back to summary |
|---|---|
| private static void weakHashLength32WithSeeds(byte[] bytes, int offset, long seedA, long seedB, long[] output) Computes intermediate hash of 32 bytes of byte array from the given offset. Results are returned in the output array - this is 12% faster than allocating new arrays every time. | |