[PATCH 2/2][BZ #16640] Remove strtok assembly implementation.

Carlos O'Donell carlos@redhat.com
Thu Mar 6 17:51:00 GMT 2014


On 03/06/2014 11:32 AM, Ondřej Bílka wrote:
> On Thu, Mar 06, 2014 at 11:20:13AM -0500, Carlos O'Donell wrote:
>> On 02/27/2014 07:42 AM, Ondřej Bílka wrote:
>>> As followup this patch removes strtok assembly implementation as it is
>>> around 2-4 times slower on sse4_2 capable machines which is a majority,
>>> as previous benchtest demonstrated.
>>>
>>> You could try to gain some cycles on older machines by using ifuncs but
>>> is a strtok important enough to complicate matters?
>>>
>>> OK to commit?
>>>
>>> 	* sysdeps/i386/i686/strtok.S: Remove.
>>> 	* sysdeps/i386/i686/strtok_r.S: Likewise.
>>> 	* sysdeps/i386/strtok.S: Likewise.
>>> 	* sysdeps/i386/strtok_r.S: Likewise.
>>> 	* sysdeps/x86_64/strtok.S: Likewise.
>>> 	* sysdeps/x86_64/strtok_r.S: Likewise.
>>
>> Is this still the case with the oldest compiler we support?
>>
> I do not understand what are you reffering to.

If you remove the strtok assembly implemetnation, the build will
fall back on use the C implementation e.g. string/strtok.c.
That C implementation will have been compiled by whichever
compiler you're using for your build. In glibc we support a wide
range of compilers from gcc 4.4 and newer. Do the older compilers,
specifically gcc 4.4, still generate good code for strtok.c which
is faster than strtok.S?

Cheers,
Carlos.
 



More information about the Libc-alpha mailing list