[PATCH] Remove i686, x86_64, and powerpc strtok implementations

Tulio Magno Quites Machado Filho tuliom@linux.vnet.ibm.com
Fri Jan 6 19:44:00 GMT 2017


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.

-- 
Tulio Magno



More information about the Libc-alpha mailing list