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

Brian Burkhalter brian.burkhalter at oracle.com
Mon May 13 18:57:31 UTC 2013


On May 11, 2013, at 8:35 PM, Alan Eliasen wrote:

On 05/09/2013 03:02 PM, Brian Burkhalter wrote:

First you have:

/** * The threshold value for using 3-way Toom-Cook multiplication. * If the number of ints in both mag arrays are greater than this number, * then Toom-Cook multiplication will be used. This value is found * experimentally to work well. */ private static final int TOOMCOOKTHRESHOLD = 75; You're right that the actual code will use Toom-Cook if 1.) both of the numbers are greater than the Karatsuba threshold and 2.) at least one of the numbers is greater than the Toom-Cook threshold. […] If you want to change the comment to something like my first sentence in the first paragraph, that would be fine. Alternately, we could change the logic to match the comment, but that would probably mean that we should re-tune the thresholds.

I would prefer simply to change the javadoc of the constant unless others have a strong preference otherwise.

Brian



More information about the core-libs-dev mailing list