Backport BigDecimal performance patches

Joe Darcy joe.darcy at oracle.com
Thu Nov 4 12:34:28 PDT 2010


Andrew Haley wrote:
> This is a backport of the BigDecimal performance rewrite.
> http://cr.openjdk.java.net/~aph/6622432-openjdk6-webrev/
>
> rev 397 : 6622432: RFE: Performance improvements to java.math.BigDecimal
> Reviewed-by: darcy
> rev 398 : 6850606: Regression from JDK 1.6.0_12
> Summary: The returned result from multiply should be constructed by using valueOf to take care of the INFLATED case.
> Reviewed-by: darcy
> rev 399 : 6876282: BigDecimal's divide(BigDecimal bd, RoundingFormat r) produces incorrect result
> Reviewed-by: darcy
>
> The patches didn't quite apply cleanly, but once I fixed them up by hand
> there were no regressions of either the JCK or JTreg.
>
> Given that 2000 lines of patch is rather hard to read, I have attached
> a diff between the patched jdk6 and the current jdk7 tree.
>
> OK for jdk6?
>
>   

Hi Andrew.

I approve this backport in principle, but need to look over the diffs 
more closely before giving the final okay.  There were some spec changes 
in BigInteger/BigDecimal in JDK 7; you seem to have correctly adjusted 
the patches for OpenJDK 6, but I just want to verify that.

Thanks for including the diff against JDK 7; that is a big aid in 
reviewing :-)

-Joe


More information about the jdk6-dev mailing list