[PATCH v3] aarch64: Optimized implementation of memcmp
Adhemerval Zanella
adhemerval.zanella@linaro.org
Thu Dec 19 19:45:00 GMT 2019
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.
More information about the Libc-alpha
mailing list