From owner-freebsd-numerics@FreeBSD.ORG Tue May 28 08:19:35 2013 Return-Path: Delivered-To: freebsd-numerics@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 58AC3BD0; Tue, 28 May 2013 08:19:35 +0000 (UTC) (envelope-from das@freebsd.org) Received: from zim.MIT.EDU (50-196-151-174-static.hfc.comcastbusiness.net [50.196.151.174]) by mx1.freebsd.org (Postfix) with ESMTP id 1F3DE1EC; Tue, 28 May 2013 08:19:34 +0000 (UTC) Received: from zim.MIT.EDU (localhost [127.0.0.1]) by zim.MIT.EDU (8.14.7/8.14.2) with ESMTP id r4S8JMeg013858; Tue, 28 May 2013 01:19:23 -0700 (PDT) (envelope-from das@freebsd.org) Received: (from das@localhost) by zim.MIT.EDU (8.14.7/8.14.2/Submit) id r4S8JLAo013857; Tue, 28 May 2013 01:19:21 -0700 (PDT) (envelope-from das@freebsd.org) Date: Tue, 28 May 2013 01:19:21 -0700 From: David Schultz To: Bruce Evans Subject: Re: Use of C99 extra long double math functions after r236148 Message-ID: <20130528081921.GB13594@zim.MIT.EDU> References: <501204AD.30605@missouri.edu> <20120727032611.GB25690@server.rulingia.com> <20120728125824.GA26553@server.rulingia.com> <501460BB.30806@missouri.edu> <20120728231300.GA20741@server.rulingia.com> <50148F02.4020104@missouri.edu> <20120729222706.GA29048@server.rulingia.com> <5015BB9F.90807@missouri.edu> <20130528043205.GA3282@zim.MIT.EDU> <20130528155933.V1298@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130528155933.V1298@besplex.bde.org> X-Mailman-Approved-At: Tue, 28 May 2013 11:40:53 +0000 Cc: Diane Bruce , John Baldwin , David Chisnall , Stephen Montgomery-Smith , freebsd-numerics@freebsd.org, Bruce Evans , Steve Kargl , Peter Jeremy , Warner Losh X-BeenThere: freebsd-numerics@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Discussions of high quality implementation of libm functions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 28 May 2013 08:19:35 -0000 On Tue, May 28, 2013, Bruce Evans wrote: > On Mon, 27 May 2013, David Schultz wrote: > > > ... > > Below is a diff of all the changes needed to integrate it. I have > > a short list of style fixes, but otherwise I think what you have > > is good: > > - wrap lines to 80 chars, please > > - spaces between operators > > - "static inline", not "inline static" > > - don't use "inline" on large functions > > Another reply. > > I think I tested "inline" on the large functions (just 2) and found > it useful for efficiency. This is like inline on large trig support > functions being useful. The inline parts are duplicated once per > C99-API function, and often the caller only uses on C99-API function. > Actually, the large inlines are not duplicated that much. cacosh() > and casinh() are just wrappers that call cacos() and casin(), > respectively. There is no inlining for the last 2 (even larger) > functions. The overhead for the wrappers is noticeable, but more > inlining didn't seem to reduce it much. > > More investigation of the extent of the style bugs: > - only 1 line is longer than 80 columns now and easy to fix. Other long > lines are for declarations where I prefer to keep the long comments > on the same line > - spaces between operations will expand a few lines beyond 80 columns if > done blindly. Only a few. If you did benchmarks to show that using inline is worthwhile despite the cache pressure, then it's fine with me. I had assumed that it was added without much thought. Also, people have been asking for someone to commit this for a long time, so I'm not going to split hairs over the spacing.