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

Commit

Permalink
HPPCRT-46: Remove CurstomHash and replace by equals/hashCode override…
Browse files Browse the repository at this point in the history
…s in normal hash containers.
  • Loading branch information
vsonnier committed Oct 21, 2015
1 parent 34a9160 commit 7e92f04
Show file tree
Hide file tree
Showing 21 changed files with 454 additions and 3,633 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[0.7.2]
** API-breaking changes
HPPCRT-46: Remove CurstomHash and replace by equals/hashCode overrides in normal hash containers.

[0.7.1]
** Bug fixes
HPPCRT-45: API with intervals arguments is inconsistent with JDK conventions.
Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Stable version is available on Maven:
<dependency>
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt</artifactId>
<version>0.7.1</version>
<version>0.7.2</version>
</dependency>
````

Expand Down
10 changes: 5 additions & 5 deletions hppcrt-benchmarks/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
<parent>
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt-parent</artifactId>
<version>0.7.2-SNAPSHOT</version>
<version>0.7.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<!-- Project info. -->
<artifactId>hppcrt-benchmarks</artifactId>
<version>0.7.2-SNAPSHOT</version>
<version>0.7.2</version>
<packaging>jar</packaging>

<name>HPPC-RT Benchmarks</name>
Expand All @@ -24,14 +24,14 @@
<commons-lang.version>2.6</commons-lang.version>

<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jmh.version>1.11</jmh.version>
<jmh.version>1.11.1</jmh.version>
<javac.target>1.7</javac.target>
<uberjar.name>benchmarks</uberjar.name>

<hppc.version>0.7.1</hppc.version>
<fastutil.version>7.0.6</fastutil.version>
<fastutil.version>7.0.7</fastutil.version>
<gs.version>6.2.0</gs.version>
<koloboke.version>0.6.7</koloboke.version>
<koloboke.version>0.6.8</koloboke.version>
<javolution.version>6.0.0</javolution.version>
</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,20 +79,6 @@ public boolean isHashQualityApplicable() {
}
},

HPPCRT_OBJ_INT_STRATEGY
{
@Override
public MapImplementation<?> getInstance(final int size, final float loadFactor)
{
return new HppcrtObjectIntCustomMap(size, loadFactor);
}

@Override
public boolean isHashQualityApplicable() {

return true;
}
},

HPPC_OBJ_INT {
@Override
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,9 @@
import com.carrotsearch.hppcrt.lists.LongArrayList;
import com.carrotsearch.hppcrt.lists.ObjectArrayList;
import com.carrotsearch.hppcrt.maps.IntLongHashMap;
import com.carrotsearch.hppcrt.maps.ObjectLongCustomHashMap;
import com.carrotsearch.hppcrt.maps.ObjectLongHashMap;
import com.carrotsearch.hppcrt.maps.ObjectLongIdentityHashMap;
import com.carrotsearch.hppcrt.procedures.LongProcedure;
import com.carrotsearch.hppcrt.strategies.ObjectHashingStrategy;

public final class HppcMapSyntheticBench
{
Expand Down Expand Up @@ -137,25 +135,7 @@ public boolean equals(final Object obj)
}
}

/**
* Testing for strategies
*/
private final ObjectHashingStrategy<ComparableInt> INTHOLDER_TRIVIAL_STRATEGY = new ObjectHashingStrategy<ComparableInt>() {

@Override
public int computeHashCode(final ComparableInt o)
{
return o.value;
}

@Override
public boolean equals(final ComparableInt o1, final ComparableInt o2)
{
return o1.value == o2.value;
}
};

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Constructor
*/
Expand Down Expand Up @@ -732,14 +712,6 @@ ObjectLongHashMap.<ComparableInt> newInstance(HppcMapSyntheticBench.COUNT, HashC
getKind, HASH_QUALITY.BAD, dis);
System.gc();
}

// use specialized strategy to overcome the bad hash behaviour above.
runMapIntegerObjectLong("ObjectLongOpenCustomHashMap with strategy",
ObjectLongCustomHashMap.<ComparableInt> newInstance(
HppcMapSyntheticBench.COUNT, HashContainers.DEFAULT_LOAD_FACTOR,
this.INTHOLDER_TRIVIAL_STRATEGY),
HppcMapSyntheticBench.COUNT, HashContainers.DEFAULT_LOAD_FACTOR, getKind, HASH_QUALITY.BAD, Distribution.HIGHBITS);
System.gc();
}

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

switch (disKind)
{
case RANDOM:
generator = disGene.RANDOM;
break;
case RANDOM:
generator = disGene.RANDOM;
break;

case CONTIGUOUS:
generator = disGene.LINEAR;
break;
case CONTIGUOUS:
generator = disGene.LINEAR;
break;

case HIGHBITS:
generator = disGene.HIGHBITS;
break;
case HIGHBITS:
generator = disGene.HIGHBITS;
break;

default:
throw new RuntimeException();
default:
throw new RuntimeException();
}

return generator;
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* main
*/
Expand Down
4 changes: 2 additions & 2 deletions hppcrt-template-processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@
<parent>
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt-parent</artifactId>
<version>0.7.2-SNAPSHOT</version>
<version>0.7.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<!-- Project info. -->
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt-template-processor</artifactId>
<version>0.7.2-SNAPSHOT</version>
<version>0.7.2</version>
<packaging>jar</packaging>

<name>HPPC-RT Template Processor</name>
Expand Down
4 changes: 2 additions & 2 deletions hppcrt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
<parent>
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt-parent</artifactId>
<version>0.7.2-SNAPSHOT</version>
<version>0.7.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

<!-- Project info. -->
<groupId>com.github.vsonnier</groupId>
<artifactId>hppcrt</artifactId>
<version>0.7.2-SNAPSHOT</version>
<version>0.7.2</version>
<packaging>jar</packaging>

<name>HPPC-RT Collections</name>
Expand Down
Loading

0 comments on commit 7e92f04

Please sign in to comment.