Add x86_64-optimized memchr, which is 4x faster
than the original implementation, into um.
Signed-off-by: Yu-Jen Chang
Signed-off-by: Ching-Chun (Jim) Huang
---
arch/x86/um/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
characters ahead the
target character. Our implementation of “memchr()” is slightly
better in the first test and nearly 4x faster than the orginal
implementation in the second test.
Signed-off-by: Yu-Jen Chang
Signed-off-by: Ching-Chun (Jim) Huang
---
arch/x86/include/asm/string_64.h | 3 ++
arch
le "string_64.c", which only contains
"memchr()". We can add more optimized string functions in it in the
future.
Yu-Jen Chang (2):
x86/lib: Optimize memchr()
x86/um: Use x86_64-optimized memchr
arch/x86/include/asm/string_64.h | 3 ++
arch/x86/lib/Makefile
David Laight 於 2022年5月30日 週一 下午4:10寫道:
>
> From: Yu-Jen Chang
> > Sent: 28 May 2022 09:13
> >
> > The original assembly version of memchr() is implemented with
> > the byte-wise comparing technique, which does not fully
> > use 64-bits registers in x86_64 CP
David Laight 於 2022年6月1日 週三 下午4:25寫道:
>
> From: Yu-Jen Chang
> > Sent: 01 June 2022 06:59
> >
> > David Laight 於 2022年5月30日 週一 下午4:10寫道:
> > >
> > > From: Yu-Jen Chang
> > > > Sent: 28 May 2022 09:13
> > > >
> > > >