[PATCH v3] powerpc: strstr optimization

Ondřej Bílka neleai@seznam.cz
Sat Jul 25 05:28:00 GMT 2015


On Thu, Jul 16, 2015 at 04:16:12PM -0400, Carlos O'Donell wrote:
> On 07/16/2015 03:55 PM, Ondřej Bílka wrote:
> > On Wed, Jul 15, 2015 at 09:40:00PM -0400, Carlos O'Donell wrote:
> >> On 07/15/2015 08:43 PM, Carlos O'Donell wrote:
> >>>> May I proceed with this commit?
> >>>
> >>> Yes, please commit this for 2.22.
> >>
> >> For the record I trust IBM to make sure these patches make incremental
> >> improvements in performance even if they are not the best possible
> >> performance as pointed out by Ondrej Bilka.
> >>
> > Sorry Carlos, your trust is misplaced. This patch wasn't reviewed at
> > all. I did that as test how much we could test IBM to verify patches. 
> > 
> > I pointed out that it could have possibly quadratic behaviour which
> > still does. So please don't accept unreviewed patches next time.
> 
> They showed cases for which the code does go faster and objectively
> so using the microbenchmark, and that's a win for now. Please continue 
> to work with IBM to remove the quadratic worst case.
>
Carlos, that benchmark lack consensus. When I wrote it at thread it was
explicitly mentioned as counterexample why it shouldn't be used. Florian
raised objection that strstr isn't used on random inputs.

Also I don't think that its 'objective' benchmark at all, for example it
never measures case when we find string could happen relatively often
when user knows that string is there.




More information about the Libc-alpha mailing list