@Benchmark public void kolobokePut() { for (int j = 0; j < LOOP_COUNT; j++) { LongLongMap newMap = HashLongLongMaps.newMutableMap(MAP_SIZE); for (int i = 0; i < KEY_COUNT; i++) { newMap.put(this.kolobokeLongKeysForMap[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++) { LongLongMap newMap = HashLongLongMaps.newMutableMap(this.longLongKoloboke); for (int i = 0; i < KEY_COUNT; i++) { newMap.remove(this.kolobokeLongKeysForMap[i]); } if (newMap.size() != 0) { throw new AssertionError("size is " + newMap.size()); } } }
@Benchmark public void kolobokeRemove() { for (int j = 0; j < LOOP_COUNT; j++) { LongLongMap newMap = HashLongLongMaps.newMutableMap(this.longLongKoloboke); for (int i = 0; i < KEY_COUNT; i++) { newMap.remove(this.kolobokeLongKeysForMap[i]); } if (newMap.size() != 0) { throw new AssertionError("size is " + newMap.size()); } } }
@Benchmark public void kolobokePut() { for (int j = 0; j < LOOP_COUNT; j++) { LongLongMap newMap = HashLongLongMaps.newMutableMap(MAP_SIZE); for (int i = 0; i < KEY_COUNT; i++) { newMap.put(this.kolobokeLongKeysForMap[i], 4); } if (newMap.size() != KEY_COUNT) { throw new AssertionError("size is " + newMap.size()); } } }
@Setup public void setUp() { this.longLongKoloboke = HashLongLongMaps.newMutableMap(MAP_SIZE); this.longLongGsc = new LongLongHashMap(MAP_SIZE); Random random = new Random(0x123456789ABCDL); int number = 23; int lower = Integer.MIN_VALUE; int upper = Integer.MAX_VALUE; long[] randomNumbersForMap = this.getRandomKeys(random).toArray(); this.gscLongKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getGSCArray(number, lower, upper, random); this.kolobokeLongKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getKolobokeArray(number, lower, upper, random); for (int i = 0; i < KEY_COUNT; i++) { this.longLongKoloboke.put(this.kolobokeLongKeysForMap[i], 5); this.longLongGsc.put(this.gscLongKeysForMap[i], 5); } this.shuffle(this.gscLongKeysForMap, random); this.shuffle(this.kolobokeLongKeysForMap, random); }
@Setup public void setUp() { this.longLongKoloboke = HashLongLongMaps.newMutableMap(MAP_SIZE); this.longLongGsc = new LongLongHashMap(MAP_SIZE); Random random = new Random(0x123456789ABCDL); int number = 23; int lower = Integer.MIN_VALUE; int upper = Integer.MAX_VALUE; long[] randomNumbersForMap = this.getRandomKeys(random).toArray(); this.gscLongKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getGSCArray(number, lower, upper, random); this.kolobokeLongKeysForMap = this.fullyRandom ? randomNumbersForMap : this.getKolobokeArray(number, lower, upper, random); for (int i = 0; i < KEY_COUNT; i++) { this.longLongKoloboke.put(this.kolobokeLongKeysForMap[i], 5); this.longLongGsc.put(this.gscLongKeysForMap[i], 5); } this.shuffle(this.gscLongKeysForMap, random); this.shuffle(this.kolobokeLongKeysForMap, random); }