This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v3] aarch64: Optimized implementation of memcmp
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: libc-alpha at sourceware dot org
- Date: Thu, 19 Dec 2019 16:44:57 -0300
- Subject: Re: [PATCH v3] aarch64: Optimized implementation of memcmp
- References: <20191023140424.17880-1-zhangxuelei4@huawei.com> <VI1PR0801MB21277791BA1818CF9623F4B3836A0@VI1PR0801MB2127.eurprd08.prod.outlook.com>
On 24/10/2019 13:33, Wilco Dijkstra wrote:
> Hi Xuelei,
>
>> The loop body is expanded from a 16-byte comparison to a 64-byte
>> comparison, and the usage of ldp is replaced by the Post-index
>> mode to the Base plus offset mode. Hence, compare can faster 18%
>> around > 128 bytes in all.
>
>>> So why not use 2xCSEL rather than a branch across the moves?
>>> That's going to be faster since the branch will be hard to predict.
>>
>> Great! This can reduce one branch prediction, and I have modified as suggested.
>>
>> Other problems like unused label and format is also corrected.
>
> Thanks, this version looks good. OK to commit.
>
> Wilco
>
I pushed it upstream.