JDK 8 RFR 8029501: BigInteger division algorithm selection heuristic is incorrect

Joseph Darcy joe.darcy at oracle.com
Wed Dec 4 01:38:53 UTC 2013

Looks good Brian; thanks,


On 12/3/2013 5:33 PM, Brian Burkhalter wrote:
> Hello,
> Issue:	https://bugs.openjdk.java.net/browse/JDK-8029501
> Webrev:	http://cr.openjdk.java.net/~bpb/8029501/webrev/
> This patch would change the division algorithm selection heuristic as previously described in [1]. Many subsequent performance benchmark runs have determined that the threshold offset should be 40 if the division threshold itself is 80 [2]. With the existing algorithm selection heuristic, i.e., dividend and divisor int-length both above the tB-Z threshold, performance regressions of up to 100% will be observed when the int-lengths of the dividend and divisor exceed the B-Z threshold but the dividend int-length is less than approximately 40 more than the divisor int-length. The proposed patch fixes that problem.
> Thanks,
> Brian
> [1] http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-November/023493.html
> [2] http://mail.openjdk.java.net/pipermail/core-libs-dev/2013-December/023668.html

More information about the core-libs-dev mailing list