[PATCH] AArch64: Improve A64FX memcpy

naohirot@fujitsu.com naohirot@fujitsu.com
Tue Jul 6 12:35:41 GMT 2021


Hi Wilco,

> From: Tamura, Naohiro/Ìï´å Ö±ŽÚ <naohirot@fujitsu.com>

> Hi Wilco,
> 
> > From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
> 
> > Since the A64FX memcpy is still quite large, I decided to do a quick
> > pass to cleanup to simplify the code. I believe the code is better
> > overall and a bit faster, but please let me know what you think. I've
> > left the structure as it was, but there are likely more tweaks possible. Here it is:
> 
> Thank you for the update, I'll take a look, give me some time.
> BTW, are we going to try to merge in this cycle? The code freeze will be held soon,
> right?
> And how did you measure the performance? Did you use some kind of simulator?
> 

The following Google Sheet Graph [1] shows the most distinctive data
without noise among the performance data I measured some times.

[1] https://docs.google.com/spreadsheets/d/1y2MwCQejNm1F3yWWbwPK5gqvdSl8QSccDx3nOZ9gtqQ/edit?usp=sharing

The updated patch performance is almost same as the master regarding
large size range, that are memcpy-large, memmove-large and
memset-large.

However, regarding small size range,
- memcpy-default shows that the master performance is better in less than
  256 byte
- memmove-default shows that the master performance is better from 1024
  byte to 2048 byte
- memset-default shows that the update patch performance is better
  from 64 byte to 1024 byte, but the master performance is better from
  1024 byte to 8192 byte. 

I think we need to do a lot of trial and error to keep the same
performance with reducing the code size.
Do you have any idea how to further update the patch?
I believe that memset 1024 byte to 8192 byte performance has something
to do with removing unroll32.
If you don't mind, I can try further improvement.

Thanks.
Naohiro


More information about the Libc-alpha mailing list