Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Jan 2012 17:43:31 -0500
From:      David Schultz <das@FreeBSD.ORG>
To:        David Chisnall <theraven@FreeBSD.ORG>, src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG
Subject:   Re: svn commit: r227753 - in head: contrib/gdtoa include lib/libc/gdtoa lib/libc/gen lib/libc/locale lib/libc/regex lib/libc/stdio lib/libc/stdlib lib/libc/stdtime lib/libc/string
Message-ID:  <20120129224331.GA38740@zim.MIT.EDU>
In-Reply-To: <20120118190714.GA13375@zim.MIT.EDU>
References:  <201111201445.pAKEjgNR096676@svn.freebsd.org> <20120118190714.GA13375@zim.MIT.EDU>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jan 18, 2012, David Schultz wrote:
> On Sun, Nov 20, 2011, David Chisnall wrote:
> > Author: theraven
> > Date: Sun Nov 20 14:45:42 2011
> > New Revision: 227753
> > URL: http://svn.freebsd.org/changeset/base/227753
> > 
> > Log:
> >   Implement xlocale APIs from Darwin, mainly for use by libc++.  This adds a
> >   load of _l suffixed versions of various standard library functions that use
> >   the global locale, making them take an explicit locale parameter.  Also
> >   adds support for per-thread locales.  This work was funded by the FreeBSD
> >   Foundation.
> >   
> >   Please test any code you have that uses the C standard locale functions!
> >   
> >   Reviewed by:    das (gdtoa changes)
> >   Approved by:    dim (mentor)
> 
> This patch appears to cause a large performance regression.  For
> example, I measured a 78% slowdown for strtol("    42", ...).
> Furthermore, the resulting static binary for a trivial program
> goes from 7k to 303k, due to pulling in malloc, stdio, and all the
> pthread stubs.  Presumably the capabilities of the non-xlocale
> entry points aren't appreciably changed, so there ought to be a
> way to avoid the overhead for them.  Do you have any thoughts on this?
> 
> Some more minor issues...
> 
> It's also customary to document public APIs so that, for
> instance, `man printf_l' pulls up a page with the prototype,
> required #includes, and behavior.  Aliasing manpages with
> MLINKS as appropriate is fine; for instance, Darwin's manpages
> on these functions look like a good example to follow.
> 
> Finally, I'm not usually one to be picky about style, but could
> you make a pass to clean things up a little bit to match the
> surrounding code, wrap multiline comments to 80 columns, etc?
> You've also added new copyright notices for one-line changes
> (e.g., stdio/vdprintf.c, gdtoa/machdep_ldis?.c) and multiple
> copyright notices in the same file (locale/collate.c), which
> could be cleaned up concurrently.

Any plans to look into this?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120129224331.GA38740>