[aarch64-port-dev ] RFR(s): AArch64: 8149080: Recoginize disjoint array copy in stub code
Andrew Haley
aph at redhat.com
Fri Feb 5 14:37:46 UTC 2016
On 02/05/2016 02:32 PM, Edward Nevill wrote:
> On Fri, 2016-02-05 at 12:58 +0000, Andrew Haley wrote:
>> On 02/05/2016 12:47 PM, Hui Shi wrote:
>>> Arraycopy without overlapping is faster than overlapped copy.
>>
>> The only thing which varies is the direction of copying. I'm not
>> aware of anything which makes one direction faster than the other.
>> Measurements, please.
>
> Copy backwards doesn't prefetch. The difference with and without
> prefetch can be very significant on some micro-arches.
>
> if (direction == copy_forwards && PrefetchCopyIntervalInBytes > 0)
> __ prfm(Address(s, PrefetchCopyIntervalInBytes), PLDL1KEEP);
>
> I have done some experiments with prefetch enabled for backwards copy
> and it shows almost identical performance to forwards copy.
OK, so let's do that, then.
Andrew.
More information about the aarch64-port-dev
mailing list