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 1/2] Add framework for tunables


On Sun, Jul 03, 2016 at 07:44:25AM -0700, H.J. Lu wrote:
> > +
> > +/* Compare environment names, bounded by the name hardcoded in glibc.  */
> > +static bool
> > +is_name (const char *orig, const char *envname)
> > +{
> > +  for (;*orig != '\0' && *envname != '\0'; envname++, orig++)
> > +    if (*orig != *envname)
> > +      break;
> > +
> > +  /* The ENVNAME is immediately followed by a value.  */
> > +  if (*orig == '\0' && *envname == '=')
> > +    return true;
> > +  else
> > +    return false;
> > +}
> 
> Can you add the length parameter to is_name and make is_name
> processor specific so that misaligned short/int/long long load can
> be used, similar to equal in

Will it really make that much of an impact?  These will be really
short comparisons (less than 16 bytes in most cases) and will really
only happen once during startup.

Maybe we could do it as an addon patch if the tunables initialization
really turns out to be that much of a bottleneck.

Siddhesh


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