From owner-cvs-src@FreeBSD.ORG Sat Jan 19 21:37:15 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 380B816A417; Sat, 19 Jan 2008 21:37:15 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 3CA7313C455; Sat, 19 Jan 2008 21:37:15 +0000 (UTC) (envelope-from bde@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m0JLbFHj095772; Sat, 19 Jan 2008 21:37:15 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m0JLbFIa095771; Sat, 19 Jan 2008 21:37:15 GMT (envelope-from bde) Message-Id: <200801192137.m0JLbFIa095771@repoman.freebsd.org> From: Bruce Evans Date: Sat, 19 Jan 2008 21:37:14 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: src/lib/msun/src s_exp2.c s_exp2f.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 19 Jan 2008 21:37:15 -0000 bde 2008-01-19 21:37:14 UTC FreeBSD src repository Modified files: lib/msun/src s_exp2.c s_exp2f.c Log: Use STRICT_ASSIGN() for exp2f() and exp2() instead of a volatile variable hack for exp2f() only. The volatile variable had a surprisingly large cost for exp2f() -- 19 cycles or 15% on i386 in the worst case observed. This is only partly explained by there being several references to the variable, only one of which benefited from it being volatile. Arches that have working assignment are likely to benefit even more from not having any volatile variable. exp2() now has a chance of working with extra precision on i386. exp2() has even more references to the variable, so it would have been pessimized more by simply declaring the variable as volatile. Even the temporary volatile variable for STRICT_ASSIGN costs 5-10% on i386, (A64) so I will change STRICT_ASSIGN() to do an ordinary assignment until i386 defaults to extra precision. Revision Changes Path 1.4 +1 -1 src/lib/msun/src/s_exp2.c 1.3 +4 -3 src/lib/msun/src/s_exp2f.c