@Benchmark public ObjObjMap<String, String> koloboke() { int localSize = this.size; String[] localElements = this.elements; ObjObjMap<String, String> koloboke = this.isPresized ? HashObjObjMaps.newMutableMap(localSize) : HashObjObjMaps.newMutableMap(); for (int i = 0; i < localSize; i++) { koloboke.put(localElements[i], "dummy"); } return koloboke; } }
@Setup public void setUp() { Random random = new Random(123456789012345L); this.elements = new String[this.size]; this.kolobokeMap = HashObjObjMaps.newMutableMap(this.size); for (int i = 0; i < this.size; i++) { String element = RandomStringUtils.random(RANDOM_COUNT, 0, 0, false, true, null, random); this.elements[i] = element; this.kolobokeMap.put(element, "dummy"); } }