On 2015-03-27 21:12, Martin Buchholz wrote:
Random advice - the default concurrency level of ConcurrentHashMap is 16, and that is almost always more than needed, probably also including here.
I believe JSR-166e (JDK8 and onwards) mostly removed the concept of concurrency level from ConcurrentHashMap (while it's still there in some constructors to confuse things). I recall some tests showing that the difference in footprint between CHM and regular HashMap/Hashtable is now negligible even for empty, default-initialized instances. /Claes