[PATCH] Make strcmp optimized for SSE2 with unaligned load/store as default

H.J. Lu hjl.tools@gmail.com
Tue Aug 25 18:34:00 GMT 2015


On Tue, Aug 25, 2015 at 9:54 AM, Ondřej Bílka <neleai@seznam.cz> wrote:
> On Tue, Aug 25, 2015 at 07:35:50AM -0700, H.J. Lu wrote:
>> On Tue, Aug 25, 2015 at 7:00 AM, Ondřej Bílka <neleai@seznam.cz> wrote:
>> > On Tue, Aug 25, 2015 at 05:24:08AM -0700, H.J. Lu wrote:
>> >> Since ld.so preserves vector registers now, we can SSE optimized strcmp
>> >> in x86-64 ld.so.
>> >>
>> >> OK for master?
>> >>
>> > Not completely, while I agree that we should use optimized strcmp I
>> > think that better default would be strcmp_sse2_unaligned.
>> >
>> > Its best for processors from core2 upwards and works everywhere as it
>> > uses only sse2.
>> >
>> > I forgot to ask about changing that when I submitted that patch.
>>
>> I think it is a good idea to make strcmp_sse2_unaligned as the
>> default and uses __strcmp_sse2 if Fast_Unaligned_Load is
>> off.
>>
> Which does some thing as ifunc, but its possible.

Here is a patch to make strcmp optimized for SSE2 with unaligned
load/store as default.  Tested on x86-64 with --disable-multi-arch and
without --disable-multi-arch.

OK for master?

Thanks.


-- 
H.J.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-strcmp-optimized-for-SSE2-with-unaligned-load-s.patch
Type: text/x-patch
Size: 127359 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20150825/e19f7cd5/attachment.bin>


More information about the Libc-alpha mailing list