Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit 7e92f04

Browse files
author
vsonnier
committed
HPPCRT-46: Remove CurstomHash and replace by equals/hashCode overrides in normal hash containers.
1 parent 34a9160 commit 7e92f04

File tree

21 files changed

+454
-3633
lines changed

21 files changed

+454
-3633
lines changed

CHANGES.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[0.7.2]
2+
** API-breaking changes
3+
HPPCRT-46: Remove CurstomHash and replace by equals/hashCode overrides in normal hash containers.
4+
15
[0.7.1]
26
** Bug fixes
37
HPPCRT-45: API with intervals arguments is inconsistent with JDK conventions.

README.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Stable version is available on Maven:
4545
<dependency>
4646
<groupId>com.github.vsonnier</groupId>
4747
<artifactId>hppcrt</artifactId>
48-
<version>0.7.1</version>
48+
<version>0.7.2</version>
4949
</dependency>
5050
````
5151

hppcrt-benchmarks/pom.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
<parent>
66
<groupId>com.github.vsonnier</groupId>
77
<artifactId>hppcrt-parent</artifactId>
8-
<version>0.7.2-SNAPSHOT</version>
8+
<version>0.7.2</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

1212
<!-- Project info. -->
1313
<artifactId>hppcrt-benchmarks</artifactId>
14-
<version>0.7.2-SNAPSHOT</version>
14+
<version>0.7.2</version>
1515
<packaging>jar</packaging>
1616

1717
<name>HPPC-RT Benchmarks</name>
@@ -24,14 +24,14 @@
2424
<commons-lang.version>2.6</commons-lang.version>
2525

2626
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
27-
<jmh.version>1.11</jmh.version>
27+
<jmh.version>1.11.1</jmh.version>
2828
<javac.target>1.7</javac.target>
2929
<uberjar.name>benchmarks</uberjar.name>
3030

3131
<hppc.version>0.7.1</hppc.version>
32-
<fastutil.version>7.0.6</fastutil.version>
32+
<fastutil.version>7.0.7</fastutil.version>
3333
<gs.version>6.2.0</gs.version>
34-
<koloboke.version>0.6.7</koloboke.version>
34+
<koloboke.version>0.6.8</koloboke.version>
3535
<javolution.version>6.0.0</javolution.version>
3636
</properties>
3737

hppcrt-benchmarks/src/main/java/com/carrotsearch/hppcrt/implementations/HashMapImplementations.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,6 @@ public boolean isHashQualityApplicable() {
7979
}
8080
},
8181

82-
HPPCRT_OBJ_INT_STRATEGY
83-
{
84-
@Override
85-
public MapImplementation<?> getInstance(final int size, final float loadFactor)
86-
{
87-
return new HppcrtObjectIntCustomMap(size, loadFactor);
88-
}
89-
90-
@Override
91-
public boolean isHashQualityApplicable() {
92-
93-
return true;
94-
}
95-
},
9682

9783
HPPC_OBJ_INT {
9884
@Override

hppcrt-benchmarks/src/main/java/com/carrotsearch/hppcrt/implementations/HppcrtObjectIntCustomMap.java

Lines changed: 0 additions & 152 deletions
This file was deleted.

hppcrt-benchmarks/src/main/java/com/carrotsearch/hppcrt/misc/HppcMapSyntheticBench.java

Lines changed: 13 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,9 @@
1515
import com.carrotsearch.hppcrt.lists.LongArrayList;
1616
import com.carrotsearch.hppcrt.lists.ObjectArrayList;
1717
import com.carrotsearch.hppcrt.maps.IntLongHashMap;
18-
import com.carrotsearch.hppcrt.maps.ObjectLongCustomHashMap;
1918
import com.carrotsearch.hppcrt.maps.ObjectLongHashMap;
2019
import com.carrotsearch.hppcrt.maps.ObjectLongIdentityHashMap;
2120
import com.carrotsearch.hppcrt.procedures.LongProcedure;
22-
import com.carrotsearch.hppcrt.strategies.ObjectHashingStrategy;
2321

2422
public final class HppcMapSyntheticBench
2523
{
@@ -137,25 +135,7 @@ public boolean equals(final Object obj)
137135
}
138136
}
139137

140-
/**
141-
* Testing for strategies
142-
*/
143-
private final ObjectHashingStrategy<ComparableInt> INTHOLDER_TRIVIAL_STRATEGY = new ObjectHashingStrategy<ComparableInt>() {
144-
145-
@Override
146-
public int computeHashCode(final ComparableInt o)
147-
{
148-
return o.value;
149-
}
150-
151-
@Override
152-
public boolean equals(final ComparableInt o1, final ComparableInt o2)
153-
{
154-
return o1.value == o2.value;
155-
}
156-
};
157-
158-
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
138+
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
159139
/**
160140
* Constructor
161141
*/
@@ -732,14 +712,6 @@ ObjectLongHashMap.<ComparableInt> newInstance(HppcMapSyntheticBench.COUNT, HashC
732712
getKind, HASH_QUALITY.BAD, dis);
733713
System.gc();
734714
}
735-
736-
// use specialized strategy to overcome the bad hash behaviour above.
737-
runMapIntegerObjectLong("ObjectLongOpenCustomHashMap with strategy",
738-
ObjectLongCustomHashMap.<ComparableInt> newInstance(
739-
HppcMapSyntheticBench.COUNT, HashContainers.DEFAULT_LOAD_FACTOR,
740-
this.INTHOLDER_TRIVIAL_STRATEGY),
741-
HppcMapSyntheticBench.COUNT, HashContainers.DEFAULT_LOAD_FACTOR, getKind, HASH_QUALITY.BAD, Distribution.HIGHBITS);
742-
System.gc();
743715
}
744716

745717
public void runMapIterationBench()
@@ -756,26 +728,26 @@ private Generator getGenerator(final Distribution disKind, final int pushedEleme
756728

757729
switch (disKind)
758730
{
759-
case RANDOM:
760-
generator = disGene.RANDOM;
761-
break;
731+
case RANDOM:
732+
generator = disGene.RANDOM;
733+
break;
762734

763-
case CONTIGUOUS:
764-
generator = disGene.LINEAR;
765-
break;
735+
case CONTIGUOUS:
736+
generator = disGene.LINEAR;
737+
break;
766738

767-
case HIGHBITS:
768-
generator = disGene.HIGHBITS;
769-
break;
739+
case HIGHBITS:
740+
generator = disGene.HIGHBITS;
741+
break;
770742

771-
default:
772-
throw new RuntimeException();
743+
default:
744+
throw new RuntimeException();
773745
}
774746

775747
return generator;
776748
}
777749

778-
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
750+
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
779751
/**
780752
* main
781753
*/

hppcrt-template-processor/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
<parent>
66
<groupId>com.github.vsonnier</groupId>
77
<artifactId>hppcrt-parent</artifactId>
8-
<version>0.7.2-SNAPSHOT</version>
8+
<version>0.7.2</version>
99
<relativePath>../pom.xml</relativePath>
1010
</parent>
1111

1212
<!-- Project info. -->
1313
<groupId>com.github.vsonnier</groupId>
1414
<artifactId>hppcrt-template-processor</artifactId>
15-
<version>0.7.2-SNAPSHOT</version>
15+
<version>0.7.2</version>
1616
<packaging>jar</packaging>
1717

1818
<name>HPPC-RT Template Processor</name>

hppcrt/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
<parent>
77
<groupId>com.github.vsonnier</groupId>
88
<artifactId>hppcrt-parent</artifactId>
9-
<version>0.7.2-SNAPSHOT</version>
9+
<version>0.7.2</version>
1010
<relativePath>../pom.xml</relativePath>
1111
</parent>
1212

1313
<!-- Project info. -->
1414
<groupId>com.github.vsonnier</groupId>
1515
<artifactId>hppcrt</artifactId>
16-
<version>0.7.2-SNAPSHOT</version>
16+
<version>0.7.2</version>
1717
<packaging>jar</packaging>
1818

1919
<name>HPPC-RT Collections</name>

0 commit comments

Comments
 (0)