On Tue, 16 Nov 2021 18:52:20 GMT, kabutz <d...@openjdk.java.net> 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? Hi Heinz, As you cite, there are a few other cases in the JDK API were a second "parallelFoo" method is exposed. However, I don't think those precedents would necessarily mandate a parallelMultiply method in BigInteger. Without a separate method, there is a question of tuning of course. ------------- PR: https://git.openjdk.java.net/jdk/pull/6409