Drop Arrays.parallelStream()?
Tim Peierls
tim at peierls.net
Sat Apr 20 15:10:33 PDT 2013
On Sat, Apr 20, 2013 at 6:01 PM, Mike Duigou <mike.duigou at oracle.com> wrote:
> I would probably always use always .stream().parallel() idiomatically for
> consistency unless parallelStream() told me why I should use it instead. I
> say toss all of the parallelStream() methods unless there's an impl
> efficiency dependent reason to retain some of them.
>
Agreed.
I see the discoverability of Collection.parallelStream() as a potential
pedagogical drawback. "Do I use parallelStream() or stream().parallel()?"
For most folks, the expectation and intuition will be sequential, so take
advantage of that: Let people come to c.stream().parallel() slowly and
deliberately, after getting their feet wet with c.stream().
--tim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/lambda-libs-spec-experts/attachments/20130420/18ff0775/attachment.html
More information about the lambda-libs-spec-experts
mailing list