Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-09 Thread kabutz
On Wed, 9 Feb 2022 22:42:50 GMT, Paul Sandoz wrote: >> src/java.base/share/classes/java/math/BigInteger.java line 1603: >> >>> 1601: * parallel multiplication algorithm will use more CPU resources >>> 1602: * to compute the result faster, with no increase in memory >>> 1603: * con

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-09 Thread kabutz
On Wed, 9 Feb 2022 22:48:57 GMT, Paul Sandoz wrote: > > A question about wording of the @implNote. In multiply() they say: "An > > implementation may offer better algorithmic ...", but we changed this to > > "This implementation may offer better algorithmic ..." I've kept it as > > "This imple

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-09 Thread Paul Sandoz
On Thu, 3 Feb 2022 05:33:52 GMT, kabutz wrote: > A question about wording of the @implNote. In multiply() they say: "An > implementation may offer better algorithmic ...", but we changed this to > "This implementation may offer better algorithmic ..." I've kept it as "This > implementation may

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-09 Thread Paul Sandoz
On Thu, 3 Feb 2022 05:29:51 GMT, kabutz wrote: >> BigInteger currently uses three different algorithms for multiply. The >> simple quadratic algorithm, then the slightly better Karatsuba if we exceed >> a bit count and then Toom Cook 3 once we go into the several thousands of >> bits. Since To

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-09 Thread Paul Sandoz
On Thu, 3 Feb 2022 06:35:47 GMT, Joe Darcy wrote: >> kabutz has updated the pull request incrementally with one additional commit >> since the last revision: >> >> Updated comment to include information about performance > > src/java.base/share/classes/java/math/BigInteger.java line 1603: >

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-02 Thread Joe Darcy
On Thu, 3 Feb 2022 05:29:51 GMT, kabutz wrote: >> BigInteger currently uses three different algorithms for multiply. The >> simple quadratic algorithm, then the slightly better Karatsuba if we exceed >> a bit count and then Toom Cook 3 once we go into the several thousands of >> bits. Since To

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-02 Thread kabutz
On Thu, 3 Feb 2022 05:29:51 GMT, kabutz wrote: >> BigInteger currently uses three different algorithms for multiply. The >> simple quadratic algorithm, then the slightly better Karatsuba if we exceed >> a bit count and then Toom Cook 3 once we go into the several thousands of >> bits. Since To

Re: RFR: JDK-8277175 : Add a parallel multiply method to BigInteger [v10]

2022-02-02 Thread kabutz
> BigInteger currently uses three different algorithms for multiply. The simple > quadratic algorithm, then the slightly better Karatsuba if we exceed a bit > count and then Toom Cook 3 once we go into the several thousands of bits. > Since Toom Cook 3 is a recursive algorithm, it is trivial to