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: [PING][PATCH] More effective generic strrchr.


On Sun, Jun 07, 2015 at 03:38:19PM +0200, OndÅej BÃlka wrote:
> On Wed, Jan 07, 2015 at 12:06:23PM +0000, Richard Earnshaw wrote:
> > On 07/01/15 11:55, OndÅej BÃlka wrote:
> > > [PING]
> > 
> > Looks sensible to me.
> > 
> > It would be useful if some of the bench tests were based on degenerate
> > examples.
> > 
> > R.
> >
> Sorry that I didn't originally noticed this mail until I returned to
> strrchr again. I commented that benchmark is pretty meaningless as
> performance depends on empirical variable and each implementation could
> be best with it suitably choosen.
> 
> Here its average number of occurences of c, if thats close to zero then
> strchr would be faster in just finding terminating zero. You need to
> have one c on average for this be worthwhile.
> 
> As my test data I used start of glibc make. That shows most strrchr
> calls. These with test that replays these with same pattern of c matches
> is here.
> 
> http://kam.mff.cuni.cz/~ondra/dryrun_strrchr.tar.bz2 
> 
> It shows considerable speedup, I don't know exactly yet as I need to
> subtract construction overhead.

As also Wilco said its improvement I plan to commit this tommorow if
nobody objects.


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