From owner-freebsd-numerics@FreeBSD.ORG Tue May 28 11:12:12 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 01C31D5B; Tue, 28 May 2013 11:12:12 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id 7D5DAE92; Tue, 28 May 2013 11:12:11 +0000 (UTC) Received: from c122-106-156-23.carlnfd1.nsw.optusnet.com.au (c122-106-156-23.carlnfd1.nsw.optusnet.com.au [122.106.156.23]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 5F0D1D405D6; Tue, 28 May 2013 21:12:00 +1000 (EST) Date: Tue, 28 May 2013 21:12:00 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: David Schultz Subject: Re: Use of C99 extra long double math functions after r236148 In-Reply-To: <20130528081921.GB13594@zim.MIT.EDU> Message-ID: <20130528205441.U2294@besplex.bde.org> 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> <20130528081921.GB13594@zim.MIT.EDU> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=BPvrNysG c=1 sm=1 a=O6A2dy7pM2IA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=Zc3-fPm5GV4A:10 a=SKYg3Y9sK9o-Tfi3u28A:9 a=CjuIK1q_8ugA:10 a=ebeQFi2P/qHVC0Yw9JDJ4g==:117 X-Mailman-Approved-At: Tue, 28 May 2013 11:41:17 +0000 Cc: Diane Bruce , Bruce Evans , John Baldwin , David Chisnall , Stephen Montgomery-Smith , freebsd-numerics@FreeBSD.org, 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 11:12:12 -0000 On Tue, 28 May 2013, David Schultz wrote: > On Tue, May 28, 2013, Bruce Evans wrote: >> >> 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. > > 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. I retested. Inlining the big function do_hard_work() helps for gcc on amd64 (about 5% faster), but makes no significant difference for clang. The previous testing was mostly with gcc. Bruce