mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julien Vermillard <jvermill...@gmail.com>
Subject Re: DefaultAttributeContainer locks ?
Date Sat, 11 May 2013 18:54:04 GMT
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
<jvermillard@gmail.com> 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

Mime
View raw message