JDK 8 core review request for 6989067 BigInteger's array copiers should be converted to System.arraycopy()
Joe Darcy
joe.darcy at oracle.com
Sat Sep 3 17:45:15 UTC 2011
David Holmes wrote:
> On 3/09/2011 9:19 AM, joe.darcy at oracle.com wrote:
>> Modified as suggested to use Arrays.copyOf before being pushed.
>>
>> The performance team recommend to me this class of change be
>> implemented so
>> I assume (and hope) the VM properly handles small arrays in a
>> performance
>> sense.
>
> I was going to ask about performance here. Of course we should be
> using arraycopy and copyOf et al and if there are performance issues
> they should be fixed in those libraries, but in reality ...
>
> I assume we have some performance benchmarks for BigInteger?
>
The SPECJBB benchmarks involved BigDecimal, which in turn uses
BigInteger (some of the time).
In any case, I think the revised code is clearer than the explicit loops.
-Joe
More information about the core-libs-dev
mailing list