This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: strstr optimization


On 05/21/2015 11:27 AM, Steven Munroe wrote:
> On Thu, 2015-05-21 at 11:08 -0400, Carlos O'Donell wrote:
>> On 05/12/2015 04:49 AM, OndÅej BÃlka wrote:
>>>>> Following function should beat it.
>>>>>
>>>>> char *strstr (char *s, char *n)
>>>>> {
>>>>>   if (n[0] == 0)
>>>>>     return s;
>>>>>   while (s = strchr (s, n[0]))
>>>>>     {
>>>>>       long i;
>>>>>       for (i=1; n[i] && n[i] == s[i]; i++);
>>>>>       if (n[i] == 0)
>>>>>         return s;
>>>>>       s++;
>>>>>     }
>>>>> }
>>>> Calling strchr in a loop is not showing  improvement when compared
>>>> to the proposed patch.
>>>>>
>>> Evidence?
>>>
>>
>> I agree with Ondrej here. What tests are you doing to show there is
>> no performance improvement? Can we see those tests? Can you contribute
>> them to the microbenchmark so other Power vendors can use them against
>> their particular hardware to validate performance?
>>
> 
> I thought this was addressed with
> https://www.sourceware.org/ml/libc-alpha/2015-05/msg00276.html
> 
> Which includes results from benchtest/bench-strstr.c.
> 
> Why do we need another micro-benchmark for this?

You don't. The above addresses my complaints. I must have missed
the other post upthread.

Cheers,
Carlos.
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]