@Benchmark public void kolobokeRemove() { for (int j = 0; j < LOOP_COUNT; j++) { IntIntMap newMap = HashIntIntMaps.newMutableMap(this.intIntKoloboke); for (int i = 0; i < KEY_COUNT; i++) { newMap.remove(this.kolobokeIntKeysForMap[i]); } if (newMap.size() != 0) { throw new AssertionError("size is " + newMap.size()); } } }
@Benchmark public void kolobokePut() { for (int j = 0; j < LOOP_COUNT; j++) { IntIntMap newMap = HashIntIntMaps.newMutableMap(MAP_SIZE); for (int i = 0; i < KEY_COUNT; i++) { newMap.put(this.kolobokeIntKeysForMap[i], 4); } if (newMap.size() != KEY_COUNT) { throw new AssertionError("size is " + newMap.size()); } } }
@Benchmark public void kolobokePut() { for (int j = 0; j < LOOP_COUNT; j++) { IntIntMap newMap = HashIntIntMaps.newMutableMap(MAP_SIZE); for (int i = 0; i < KEY_COUNT; i++) { newMap.put(this.kolobokeIntKeysForMap[i], 4); } if (newMap.size() != KEY_COUNT) { throw new AssertionError("size is " + newMap.size()); } } }
@Benchmark public void kolobokeRemove() { for (int j = 0; j < LOOP_COUNT; j++) { IntIntMap newMap = HashIntIntMaps.newMutableMap(this.intIntKoloboke); for (int i = 0; i < KEY_COUNT; i++) { newMap.remove(this.kolobokeIntKeysForMap[i]); } if (newMap.size() != 0) { throw new AssertionError("size is " + newMap.size()); } } }
@Setup public void setUp() { this.intIntKoloboke = HashIntIntMaps.newMutableMap(MAP_SIZE); this.intIntGsc = new IntIntHashMap(MAP_SIZE); this.integerIntegerJdk = new HashMap<>(MAP_SIZE); Random random = new Random(0x123456789ABCDL); int[] randomNumbersForMap = this.getRandomKeys(random).toArray(); int number = 23; int lower = Integer.MIN_VALUE; int upper = Integer.MAX_VALUE; this.kolobokeIntKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getKolobokeArray(number, lower, upper, random); this.gscIntKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getGSCArray(number, lower, upper, random); this.jdkIntKeysForMap = this.fullyRandom ? IntIntMapLargeStressTest.boxIntArray(randomNumbersForMap) : this.getJDKArray(lower, upper, random); for (int i = 0; i < KEY_COUNT; i++) { this.intIntKoloboke.put(this.kolobokeIntKeysForMap[i], 5); this.intIntGsc.put(this.gscIntKeysForMap[i], 5); this.integerIntegerJdk.put(this.jdkIntKeysForMap[i], 5); } this.shuffle(this.gscIntKeysForMap, random); this.shuffle(this.kolobokeIntKeysForMap, random); this.shuffle(this.jdkIntKeysForMap, random); }
@Setup public void setUp() { this.intIntKoloboke = HashIntIntMaps.newMutableMap(MAP_SIZE); this.intIntGsc = new IntIntHashMap(MAP_SIZE); this.integerIntegerJdk = new HashMap<>(MAP_SIZE); Random random = new Random(0x123456789ABCDL); int[] randomNumbersForMap = this.getRandomKeys(random).toArray(); int number = 23; int lower = Integer.MIN_VALUE; int upper = Integer.MAX_VALUE; this.kolobokeIntKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getKolobokeArray(number, lower, upper, random); this.gscIntKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getGSCArray(number, lower, upper, random); this.jdkIntKeysForMap = this.fullyRandom ? IntIntMapSmallStressTest.boxIntArray(randomNumbersForMap) : this.getJDKArray(lower, upper, random); for (int i = 0; i < KEY_COUNT; i++) { this.intIntKoloboke.put(this.kolobokeIntKeysForMap[i], 5); this.intIntGsc.put(this.gscIntKeysForMap[i], 5); this.integerIntegerJdk.put(this.jdkIntKeysForMap[i], 5); } this.shuffle(this.gscIntKeysForMap, random); this.shuffle(this.kolobokeIntKeysForMap, random); this.shuffle(this.jdkIntKeysForMap, random); }
for (int s = 1 << 16; s >= 64; s >>>= 1) { ConcurrentMap<Integer, Integer> map = new ConcurrentHashMap<>(); HashIntIntMap map2 = HashIntIntMaps.newMutableMap(s); int[] array = new int[s]; long t0 = System.nanoTime();
protected void _report(int[] aut) { if(_reporter == null) return; int numVertices = pattern.getNumberOfVertices(); HashIntIntMap real_aut = HashIntIntMaps.newMutableMap(numVertices); for (int i = 0; i < numVertices; ++i) { real_aut.put(i, aut[i]); } _reporter.report(real_aut, _reporter_param); }
@Override public IntIntMap getCanonicalLabeling() { if (dirtyCanonicalLabelling) { synchronized (this) { if (dirtyCanonicalLabelling) { if (canonicalLabelling == null) { canonicalLabelling = HashIntIntMaps.newMutableMap(getNumberOfVertices()); } canonicalLabelling.clear(); fillCanonicalLabelling(canonicalLabelling); dirtyCanonicalLabelling = false; } } } return canonicalLabelling; }
IntIntMap vertexTranslationMap = HashIntIntMaps.newMutableMap(); IntIntMap vertexLabels = HashIntIntMaps.newMutableMap();
IntIntMap vertexTranslationMap = HashIntIntMaps.newMutableMap();
IntIntMap vertexTranslationMap = HashIntIntMaps.newMutableMap();