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: [RFC] Statistics of non-ASCII characters in strings


On 12/22/2014 03:46 PM, Wilco Dijkstra wrote:
Does anyone have statistics of how often strings contain non-ASCII characters? I'm asking because
it's feasible to make many string functions faster if they are predominantly ASCII by using a
different check for the null byte.

Why can't you do the equivalent of

  X = ((X & 0x80) >> 1) | (X & 0x7F);

before the new check?  Does this lengthen the dependency chain too much?

--
Florian Weimer / Red Hat Product Security


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