This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Improve 64 bit memchr, memrchr, rawmemchr with SSE2


Hello,

This patch improves 64 bit memchr, rawmemchr, memrchr functions for all
64 bit architectures.

Main feature is using 64bytes loop with pmaxub instructions.

For example, it improves performance:

-- for memchr
---- by up to 2X on atom, up to 2X on core7.

-- for memrchr
---- by up to 4.5X on atom, up to 6X on core7.

-- for rawmemchr
---- by up to 2X on atom, up to 6.4X on core7.

"Make check" was run successfully on my atom and core2 machines, I
built rpms and checked them as well.

2011-08-31  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>

	* sysdeps/x86_64/multiarch/rawmemchr.S: Update.
	Use new sse2 version for core i3 - i7 as it's faster
	than sse42 version.
	(bit_Prefer_PMINUB_for_stringop): New.

	* sysdeps/x86_64/rawmemchr.S: Update.
	Replace with faster SSE2 version.
	* sysdeps/x86_64/memrchr.S: New file.
	* sysdeps/x86_64/memchr.S: Update.
	Replace with faster SSE2 version.

--
Liubov Dmitrieva
Software engineer
Intel Corporation

Attachment: memchr_family_64.patch
Description: Binary data

Attachment: ChangeLog.memchr_family_64
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]