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] Improve strstr performance


Adhemerval Zanella wrote:
  
>> Overall the synced version makes the code far more readable, so it is a good idea
>> as a basis for further improvements. However it will only be faster with my patch
>> fully merged.
>
> My intention was to check if it would be worth to sync gnulib and then
> apply your change on top or the other way around.  It seems it would be
> better to add your patch and I will propose another with some gnulib
> changes (mainly documentation and small optimizations).  Some glibc
> differences seems more to get around some compiler missed optimization
> than actually code improvements (99677e575504 for instance).

I've committed my strstr patch now. If I had known about the gnulib version,
I would have started from that! It looks it can be simplified further - due to
strchr/memchr/strnlen using a single pointer everywhere would be best. 

I don't think there is any point working around missed compiler optimizations -
it seems better to fix GCC if the issue still exists.

Wilco


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