RFR: JDK-8277175 : Add a parallel multiply method to BigInteger
kabutz
duke at openjdk.java.net
Tue Nov 16 18:55:40 UTC 2021
On Tue, 16 Nov 2021 18:42:42 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> It isn't clear to me that parallelMultiply should be a public method as opposed to an implementation detail.
Hi Joe, thanks for responding. I would have preferred for it to be an implementation detail, but I thought it best to keep things consistent with other parts of the JDK. For example:
- Arrays#sort() vs Arrays#parallelSort()
- Collection#stream() vs Collection#parallelStream()
One could do it as an implementation detail, with a special flag to turn off the functionality. But that would mean that the parallelMultiply() would be on for all multiplications in a system. I would expect that some organizations would for whatever reason not want to use more cores than absolutely necessary?
-------------
PR: https://git.openjdk.java.net/jdk/pull/6409
More information about the core-libs-dev
mailing list