Spliterator implementations

Doug Lea dl at cs.oswego.edu
Mon Jan 14 12:33:33 PST 2013


Status report. The implementations for a bunch of these are
now basically done. (modulo some API issues Brian
and I are working out.) Here's a run-down. Reasonably
soon I might need the help of Mike to do lambda checkins?

A few quick notes:
* So far only lightly tested, mainly by adding up a million Longs
seq and par, across different variants
* For map views, that tend to have relatively slow iterators
that can be streamlined a lot in consolidated forEach loops,
seq spliterator.forEach performance is usually very
good, so long as lambdas get resolved. Other cases less so.



On 01/02/13 16:04, Doug Lea wrote:

> For top-level classes only:
>    j.u.c/jsr166:
>      ArrayDeque,
done

>      ArrayBlockingQueue,
>      ConcurrentLinkedDeque,
>      ConcurrentLinkedQueue,
>      CopyOnWriteArraySet,
>      DelayQueue,
>      LinkedBlockingDeque,
>      LinkedBlockingQueue,
>      LinkedTransferQueue,
use default on all of these

>      PriorityBlockingQueue,
done (as snaoshot)

>      PriorityQueue,
done

>      SynchronousQueue
use default

>    j.u:
>      AbstractCollection,
>      AbstractQueue,
>      AbstractSet,
other people are doing these

>      EnumSet,

not sure if anyone is doing; default probably OK

>      HashSet (delegates to HashMap.keySet),

I think other people are doing?

>      LinkedHashSet (delegates to LinkedHashMap.keySet)
I think other people are doing?

>      Stack,

exists

>    other jdk:
>      BeanContextSupport (delegates to HashMap.keySet)
>      BeanContextServicesSupport (super BeanContextSupport)
>      JobStateReasons, (super HashSet)

not me.

>
> For both top-level and subList classes
>    j.u.c/jsr166
>      CopyOnWriteArrayList,
done

>    j.u:
>      AbstractList,
>      AbstractSequentialList,
other people are doing these

>      ArrayList,
exists, but may help improve


>      AttributeList,

dunno

>      LinkedList,
presumably use default

>      Stack (super Vector),
>      Vector
other people are doing these

>    other jdk:
>      RoleList (super ArrayList),
>      RoleUnresolvedList (super ArrayList),
dunno

> For both top-level and subSet classes:
>    j.u.c/jsr166
>      ConcurrentSkipListSet,
done (and surprisingly fast)

>      TreeSet
done

> For keySet, values and entrySet views of:
>    j.u.c/jsr166
>      ConcurrentHashMap,
done
>    j.u:
>      AbstractMap,
other people?

>      EnumMap,
not sure if anyone is doing; default probably OK

>      HashMap,
I'm pretty sure someone else is overhauling JDK8 HM?


>      Hashtable,
ditto?

>      IdentityHashMap,
done (and has the best parallel speedups)

>      LinkedHashMap, (super HashMap but cannot use same Spliterator)
Please not me.


>      WeakHashMap
not yet done -- I just remembered that it is not subject
to alt-hash overhaul

>    other jdk:
>      Attributes (delegates to HashMap)
>      AuthProvider (super Provider)
>      PrinterStateReasons, (super HashMap)
>      Properties, (super Hashtable)
>      Provider (super Properties),
>      RenderingHints (delegates to HashMap)
>      SimpleBindings (delegates to any Map),
>      TabularDataSupport, (delegates to
>      UIDefaults, (super Hashtable)
dunno

> For keySet, values and entrySet views, plus the same for subMap views:
>    j.u.c/jsr166
>      ConcurrentSkipListMap,
>      TreeMap,

done for TreeMap.descendingX only. The others use defaults.

-Doug




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