Loose-ends wrapup

Doug Lea dl at cs.oswego.edu
Sat May 11 08:02:12 PDT 2013


Yet another self-reply...

On 05/10/13 13:02, Doug Lea wrote:
> On 05/09/13 15:14, Brian Goetz wrote:
>
>> What others have I missed?
>
> The lambda-dev post by John Rose reminded me that we were going
> to revisit the need for ConcurrentHashBag: A (massive) simplification
> of CHM that only conforms to Collection interface (so among
> other things, duplicates are allowed), and is handy
> for shoving unordered elements for concurrent aggregation.
> I've had a version of this sitting around for a year or so...
>

The empirical question is what a (renamed) ConcurrentHashBuffer
buys you. How common is collecting into an unordered
non-Set, non-Map destination? (CHM and CHM.newKeySet suffice
for the others.)  And of those, what is the likelihood that these
collections have mostly-distinct elements? If they are mostly
the same, then hashing into a buffer will often be worse than other
options because of all the collisions.

Which all together, still seems on the marginal side for JDK
inclusion. Maybe I should package up ConcurrentHashBuffer as
one of our jsr166e.extra classes.

(Aside: it would still be nice if there were a convenient way
for people to collect into something providing our scalable
frequency histogram idioms.)

-Doug








More information about the lambda-libs-spec-experts mailing list