Review Request: BigInteger patch for efficient multiplication and division (#4837946)

Alan Eliasen eliasen at
Tue Mar 5 07:40:53 UTC 2013

Alan Eliasen wrote:
>> Brian, as you may also not know, I have further patches to 
>> drastically improve the toString behavior of BigInteger using 
>> Schoenhage-Strassen recursive decomposition.  This makes toString
>> orders of magnitude faster for large numbers and will likely
>> improve the performance of some of the stuff you're doing in
>> BigDecimal as well.  I will polish those up and submit them when
>> you've reviewed the multiplication and pow fixes.

On 03/04/2013 05:09 PM, Brian Burkhalter wrote:
> Thanks for the additional information and suggestions. While not
> based on anything substantive about the various additional changes
> you suggest, my initial reaction is first to try to review and
> integrate the patches already in the queue and then deal with these
> other improvements afterwards, preferably using patches against the
> current repository tip. These other ideas should have issues filed
> for them as well.

   There are issues filed about the inefficient algorithms used in
toString and pow:

4641897: BigInteger.toString() algorithm slow for large numbers

4646474: BigInteger.pow() algorithm slow in 1.4.0

   Unfortunately, because of the destruction of all the user-submitted
fixes in bug reports (when are those coming back?) you can't see the
further comments about these.  You have my much faster pow() routines in
Tim Buktu's combined patch for BigInteger, I believe, and you should be
able to close the latter bug if you merge that entire patch.  My way
faster toString patch is not included in that combined patch.

  Alan Eliasen
  eliasen at

More information about the core-libs-dev mailing list