[Bug 1720832] Re: Optimized memcmp for arm64
dann frazier
dann.frazier at canonical.com
Wed Oct 4 20:32:52 UTC 2017
** Changed in: glibc (Ubuntu)
Assignee: (unassigned) => Adam Conrad (adconrad)
** Changed in: glibc (Ubuntu)
Status: New => Confirmed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to glibc in Ubuntu.
https://bugs.launchpad.net/bugs/1720832
Title:
Optimized memcmp for arm64
Status in glibc package in Ubuntu:
Confirmed
Bug description:
A patch has recently landed upstream to optimize memcmp for AArch64:
commit 922369032c604b4dcfd535e1bcddd4687e7126a5
Author: Wilco Dijkstra <wdijkstr at arm.com>
Date: Thu Aug 10 17:00:38 2017 +0100
[AArch64] Optimized memcmp.
This is an optimized memcmp for AArch64. This is a complete rewrite
using a different algorithm. The previous version split into cases
where both inputs were aligned, the inputs were mutually aligned and
unaligned using a byte loop. The new version combines all these cases,
while small inputs of less than 8 bytes are handled separately.
This allows the main code to be sped up using unaligned loads since
there are now at least 8 bytes to be compared. After the first 8 bytes,
align the first input. This ensures each iteration does at most one
unaligned access and mutually aligned inputs behave as aligned.
After the main loop, process the last 8 bytes using unaligned accesses.
This improves performance of (mutually) aligned cases by 25% and
unaligned by >500% (yes >6 times faster) on large inputs.
* sysdeps/aarch64/memcmp.S (memcmp):
Rewrite of optimized memcmp.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/glibc/+bug/1720832/+subscriptions
More information about the foundations-bugs
mailing list