Zero allocation hashing v0.8

This commit is contained in:
Peter Lawrey
2018-04-27 12:53:06 +01:00
parent 1237d9feca
commit 16399bea7e
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -177,7 +177,7 @@
<dependency>
<groupId>net.openhft</groupId>
<artifactId>zero-allocation-hashing</artifactId>
<version>0.4</version>
<version>0.8</version>
<scope>test</scope>
</dependency>
@@ -56,7 +56,7 @@ public class KeySegmentDistributionTest {
for (int i = 0; i < size; i++) {
random.nextBytes(keyBytes);
String key = new String(keyBytes, StandardCharsets.US_ASCII);
long hash = LongHashFunction.xx_r39().hashBytes(StandardCharsets.UTF_8.encode(key));
long hash = LongHashFunction.xx().hashBytes(StandardCharsets.UTF_8.encode(key));
int segmentIndex = (((int) hash) & Integer.MAX_VALUE) % segments;
// Put the segment index as a value to the map
map.put(key, segmentIndex);