Page MenuHomePhabricator

[libc] Use different alignment for memcpy between ARM and x86.

Authored by gchatelet on Apr 26 2021, 7:34 AM.



Aligned copy used to be 'destination aligned' for x86 but this decision was reverted in D93457 where we noticed that it was better for ARM to be 'source aligned'.
More benchmarking confirmed that it can be up to 30% faster to align copy to destination for x86. This Patch offers both implementations and switches x86 back to destination aligned.

Diff Detail

Event Timeline

gchatelet created this revision.Apr 26 2021, 7:34 AM
gchatelet requested review of this revision.Apr 26 2021, 7:34 AM

Note that the code in this patch will be replaced in D100646 where we provide a cleaner and more general implementation.

sivachandra accepted this revision.Apr 26 2021, 8:15 AM
sivachandra added inline comments.

Should we have a test for CopyDstAlignedBlocks?

This revision is now accepted and ready to land.Apr 26 2021, 8:15 AM
  • Added tests for CopyDstAlignedBlocks
  • Also fix alignment to 32 byte on x86.
This revision was landed with ongoing or failed builds.Apr 26 2021, 12:30 PM
This revision was automatically updated to reflect the committed changes.