i made a (very) dumb micro bench, if you access the structure from always the same thread : so it never lock the ConcurentHashMap version is quite faster :
https://gist.github.com/jvermillard/5560969 for accessing 1000000000 entries : time : 22396 ms for hash map + read/write lock time : 8034 ms for concurrent hash map Julien On Sat, May 11, 2013 at 7:32 PM, Julien Vermillard <[email protected]> wrote: > Hi, > DefaultAttributeContainer.java (which is the container session > attributes) use a hash map + some read and write lock. > > I wonder why we don't simply use a ConcurrentHashMap here ? > > Julien
