Loose-ends wrapup

Doug Lea dl at cs.oswego.edu
Wed May 15 08:02:52 PDT 2013

One more, that Brian and I have discussed off an on for a year or so,
that always ends up as too hard to decide.

Do we want to overload Collection.parallelStream(int minParSize)?
minParSize is the minimum number of elements to process in parallel,
else sequential.

And/or overload Stream.parallel().

Arguments for:

* Parallel performance for the combination of small N and
cheap lambdas (like adding numbers) is crummy. There's
little hope of automating decisions unless/until we can
automate cost metrics of lambdas, which is not going to happen
any time soon.

* People might want to write code that uses parallelStrerams
only if they have a lot of elements, that they might not
know ahead of time.


* Most people do not know what values are reasonable.

* The "best" values are likely to change in the future.

One compromise is to do this only for the custom CHM parallel
task methods, that are most likely to be used only by people
who are also most likely to want to tune performance.

(I'm on my way out to a conference program committee meeting
for two days, so replies might be slow.)


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