On Wed, Dec 29, 2010 at 1:08 AM, Todd <[email protected]> wrote:
> I thought it'd be interesting to look closer at the insertion times as a fx
> of the size of the Map. The results are at:
>
> https://gist.github.com/758198
>
> At first I thought I'd found something interesting, only to investigate
> further and realize that I'd been testing through a fx that was using
> reflection (see trial results at bottom, Trials 1-4), and this was
> completely swamping the results.
>
> In Trial #5, I realized what I'd done, and broke my generic test fx into two
> separate functions w/ proper type hinting (my-test-map and my-test-nbhm).
> Now my results are on par w/ yours, and I don't see any significant change
> in insertion times as a fx of map size up to 1e5.
>
> Overall, NonBlockingHashMap insertions to take ~10x longer than the
> SynchronizedHashMap.

A more apples-to-apples comparison might be with ConcurrentHashMap,
since that allows for lots of concurrent nonblocking readers like
NonBlockingHashMap and unlike SynchronizedHashMap.

How fast is ConcurrentHashMap?

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to