This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Remove i686, x86_64, and powerpc strtok implementations
On 06/01/2017 17:43, Tulio Magno Quites Machado Filho wrote:
> Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
>
>> Based on comments on previous attempt to address BZ#16640 [1],
>> the idea is not support invalid use of strtok (the original
>> bug report proposal). This leader to a new strtok optimized
>> strtok implementation [2].
>>
>> The idea of this patch is to fix BZ#16640 to align all the
>> implementations to a same contract. However, with newer strtok
>> code it is better to get remove the old assembly ones instead of
>> fix them.
>>
>> For x86 is a gain in all cases since the new implementation can
>> potentially use sse2/sse42 implementation for strspn and strcspn.
>> This shows a better performance on both i686 and x86_64 using
>> the string benchtests.
>>
>> On powerpc64 the gains are mixed, where only for larger inputs
>> or keys some gains are showns (based on benchtest it seems that
>> it shows some gains for keys larger than 10 and inputs larger
>> than 32). I would prefer to remove the optimized implementation
>> based on first code simplicity and second because some more gain
>> could be optimized using a better optimized strcspn/strspn
>> code (as for x86). However if powerpc arch maintainers prefer I
>> can send a v2 with the assembly code adjusted instead.
>
> LGTM.
>
Thanks, I think I will need ack from x86 maintainers as well.