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

Brian Burkhalter brian.burkhalter at
Tue Mar 5 00:09:18 UTC 2013

Heinz and Alan,

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.



On Mar 4, 2013, at 3:24 PM, Alan Eliasen wrote:

> On 03/04/2013 03:37 PM, Dr Heinz M. Kabutz wrote:
>> Whilst we're at it, could we also add an option, perhaps via
>> environment variable, to parallelize Karatsuba and other calculations?
>> Here's an article I wrote about the inefficiencies of BigInteger and
>> working out large numbers:
>   That's an interesting article, thanks.
>   When I first made the patches for faster multiplication, I was asked
> to generate small, simple patches so that they would be reviewed more
> rapidly.  I didn't make any attempt to use multiple threads, although
> these recursive divide-and-conquer algorithms would seem to be good
> candidates for such algorithms
>   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.

More information about the core-libs-dev mailing list