mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-29 11:41:21 +03:00
PowerPC: strrchr optimization for POWER7/PPC64
This patch optimizes strrchr() for ppc64. It uses aligned memory access along with cmpb instruction and CPU prefetch to avoid cache misses for speed improvement.
This commit is contained in:
committed by
Adhemerval Zanella
parent
235eed8644
commit
c7debbdfac
@ -19,9 +19,13 @@
|
||||
|
||||
#undef strrchr
|
||||
|
||||
#ifndef STRRCHR
|
||||
# define STRRCHR strrchr
|
||||
#endif
|
||||
|
||||
/* Find the last occurrence of C in S. */
|
||||
char *
|
||||
strrchr (const char *s, int c)
|
||||
STRRCHR (const char *s, int c)
|
||||
{
|
||||
const char *found, *p;
|
||||
|
||||
|
Reference in New Issue
Block a user