powerpc: Improve strcmp performance for shorter strings
authorRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Tue, 7 Feb 2017 05:10:26 +0000 (10:40 +0530)
committerRajalakshmi Srinivasaraghavan <raji@linux.vnet.ibm.com>
Tue, 7 Feb 2017 05:10:26 +0000 (10:40 +0530)
commit04f0fd640d78ff715cb9409f03d55366ed76966e
treedfef9d58915c0a6788b1c76524949a8ed5546e5f
parentdcd4cd575678c94f042c1a6b08663c648781a9eb
powerpc: Improve strcmp performance for shorter strings

For strings >16B and <32B existing algorithm takes more time than default
implementation when strings are placed closed to end of page. This is due
to byte by byte access for handling page cross. This is improved by
following >32B code path where the address is adjusted to aligned memory
before doing load doubleword operation instead of loading bytes.

Tested on powerpc64 and powerpc64le.
ChangeLog
sysdeps/powerpc/powerpc64/power8/strcmp.S
sysdeps/powerpc/powerpc64/power9/strcmp.S