This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] Do not transform strchr into rawmemchr
- From: Wilco Dijkstra <Wilco dot Dijkstra at arm dot com>
- To: Zack Weinberg <zackw at panix dot com>
- Cc: "libc-alpha at sourceware dot org" <libc-alpha at sourceware dot org>, nd <nd at arm dot com>
- Date: Thu, 17 Nov 2016 11:22:37 +0000
- Subject: Re: [PATCH] Do not transform strchr into rawmemchr
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp.mailfrom=Wilco dot Dijkstra at arm dot com;
- Nodisclaimer: True
- References: <AM5PR0802MB26102CD0C9B41C82C3CF58A483BE0@AM5PR0802MB2610.eurprd08.prod.outlook.com> <AM5PR0802MB26101582FEA5EBF10B7CE8F583BE0@AM5PR0802MB2610.eurprd08.prod.outlook.com>,<CAKCAbMjOaQTuJ8oN2J02Msxszz+8EqunAj9HHJGJ+p94G4Xw1w@mail.gmail.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Zack Weinberg wrote:
> I endorse the removal of the non-optimization, but ...
> ... wouldn't it be just as effective to remove this block entirely?
> That is, don't #define strchr at all.
Well that's a good question. Most string functions directly use the GCC
builtin either via a define or via an inline function, so I simply follow that
However is there any benefit in doing so? If there is no benefit then we could
remove a lot of code from the GLIBC headers, particularly string.h (and your
covariance patch could become even simpler without the inline functions).