This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH] Use strlen when searching for a nul char
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Wilco Dijkstra <wdijkstr at arm dot com>
- Cc: <pinskia at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 7 Oct 2015 17:17:42 +0000
- Subject: RE: [PATCH] Use strlen when searching for a nul char
- Authentication-results: sourceware.org; auth=none
- References: <003a01d1010c$ad404240$07c0c6c0$ at com> <5F638E7C-B8BD-4F94-8278-1F8B359CACCA at gmail dot com> <alpine dot DEB dot 2 dot 10 dot 1510071505450 dot 29388 at digraph dot polyomino dot org dot uk> <003c01d1011e$cda64e50$68f2eaf0$ at com>
On Wed, 7 Oct 2015, Wilco Dijkstra wrote:
> > I agree; I'd rather discourage the addition of such optimizations as
> > inlines in glibc unless they depend on information that's inherently not
> > available to GCC (e.g. properties of architecture-specific function
> > implementations in glibc). As I said before in
> > <https://sourceware.org/ml/libc-alpha/2015-06/msg00146.html> the aim
> > should be to make the GNU system as a whole as good as possible.
>
> Does this mean we no longer care about supporting older GCC versions
> efficiently in GLIBC?
We expect people caring about microoptimizations to use current tool
versions.
> Ie. can we remove bits/string2.h and just do a trivial implementation of
> the inlines in string/string-inlines.c?
See the discussion starting at
<https://sourceware.org/ml/libc-alpha/2015-05/msg00526.html>. We could
remove optimizations only relevant to old compilers (say pre-4.1 or
pre-4.3, potentially pre-4.6 if that actually means significant cleanup),
yes.
Note this does *not* automatically mean completely removing the header -
for example, code mapping __func to __builtin_func may still be relevant,
at least when building glibc, so you need to be careful that the code you
remove really is dead with modern GCC. And you need to allow for the x86
version of string-inlines.c as well. See my reviews of Ondřej's patches
<https://sourceware.org/ml/libc-alpha/2015-05/msg00770.html> and
<https://sourceware.org/ml/libc-alpha/2015-05/msg00772.html>.
--
Joseph S. Myers
joseph@codesourcery.com