From owner-svn-src-head@FreeBSD.ORG Sun Jan 29 22:43:32 2012 Return-Path: Delivered-To: svn-src-head@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EA2D9106566C; Sun, 29 Jan 2012 22:43:32 +0000 (UTC) (envelope-from das@FreeBSD.ORG) Received: from zim.MIT.EDU (ZIM.MIT.EDU [18.95.3.101]) by mx1.freebsd.org (Postfix) with ESMTP id 889A78FC13; Sun, 29 Jan 2012 22:43:32 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.5/8.14.2) with ESMTP id q0TMhVMH038755; Sun, 29 Jan 2012 17:43:31 -0500 (EST) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by zim.MIT.EDU (8.14.5/8.14.2/Submit) id q0TMhV8D038754; Sun, 29 Jan 2012 17:43:31 -0500 (EST) (envelope-from das@FreeBSD.ORG) Date: Sun, 29 Jan 2012 17:43:31 -0500 From: David Schultz To: David Chisnall , src-committers@FreeBSD.ORG, svn-src-all@FreeBSD.ORG, svn-src-head@FreeBSD.ORG Message-ID: <20120129224331.GA38740@zim.MIT.EDU> Mail-Followup-To: David Chisnall , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201111201445.pAKEjgNR096676@svn.freebsd.org> <20120118190714.GA13375@zim.MIT.EDU> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120118190714.GA13375@zim.MIT.EDU> Cc: 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 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 Jan 2012 22:43:33 -0000 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?