From owner-cvs-src@FreeBSD.ORG Sun Mar 30 18:07:13 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 5AA261065672; Sun, 30 Mar 2008 18:07:13 +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 0B1C18FC13; Sun, 30 Mar 2008 18:07:13 +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 m2UI7C8d007980; Sun, 30 Mar 2008 18:07:12 GMT (envelope-from bde@repoman.freebsd.org) Received: (from bde@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m2UI7CNR007979; Sun, 30 Mar 2008 18:07:12 GMT (envelope-from bde) Message-Id: <200803301807.m2UI7CNR007979@repoman.freebsd.org> From: Bruce Evans Date: Sun, 30 Mar 2008 18:07:12 +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 e_hypot.c e_hypotf.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: Sun, 30 Mar 2008 18:07:13 -0000 bde 2008-03-30 18:07:12 UTC FreeBSD src repository Modified files: lib/msun/src e_hypot.c e_hypotf.c Log: Use fabs[f]() instead of bit fiddling for setting absolute values. This makes little difference in float precision, but in double precision gives a speedup of about 30% on amd64 (A64 CPU) and i386 (A64). This depends on fabs[f]() being inline and efficient. The bit fiddling (or any use of SET_HIGH_WORD(), which libm does too much because it was best on old 32-bit machines) always causes packing overheads and sometimes causes stalls in the packing, since it operates on only part of a variable in the double precision case. It apparently did cause stalls in a critical path here. Revision Changes Path 1.12 +2 -2 src/lib/msun/src/e_hypot.c 1.13 +2 -2 src/lib/msun/src/e_hypotf.c