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
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, libc-alpha at sourceware dot org
- Cc:
- Date: Fri, 06 Jan 2017 17:43:56 -0200
- Subject: Re: [PATCH] Remove i686, x86_64, and powerpc strtok implementations
- Authentication-results: sourceware.org; auth=none
- References: <1483712763-27890-1-git-send-email-adhemerval.zanella@linaro.org>
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