From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 19793 invoked from network); 26 Jan 1999 21:58:39 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 26 Jan 1999 21:58:39 -0000 Received: from beach.frankfurt.netsurf.de (root@beach.frankfurt.netsurf.de [194.64.181.2]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id QAA00667 for ; Tue, 26 Jan 1999 16:30:11 -0500 Received: from Othello ([194.195.95.44]) by beach.frankfurt.netsurf.de (8.8.5/8.8.5) with SMTP id WAA13216 for ; Tue, 26 Jan 1999 22:30:09 +0100 (MET) From: Joachim Wesner To: axp-list@redhat.com Subject: Re: An sqrt() experiment Date: Tue, 26 Jan 1999 22:20:58 +0100 X-Mailer: KMail [version 0.7.9] Content-Type: text/plain References: <199901261939.LAA05186@netcom6.netcom.com> MIME-Version: 1.0 Message-Id: <99012622293900.04898@Othello> Content-Transfer-Encoding: quoted-printable On Tue, 26 Jan 1999, Munagala V. S. Ramanath wrote: >Hi,=0D >=0D >This may be of interest to the math lib aficionados: Sun released a=0D >freely redistributable floating point math library (full sources)=0D >around 1996 called fdlibm. I've found it at:=0D > ftp://ftp.imar.ro/pub/trieste/math/netlib/fdlibm=0D >=0D >The code is not 64-bit aware but makes very interesting reading=0D >including the comments. In particular, the comments in e_sqrt.c=0D >suggested what seemed like an interesting approach, so I did a=0D >quick-and-dirty C coding job for timing purposes. It runs about 4=0D >times faster than the version in libm but libffm routine runs an=0D >additional 36% faster, presumably because of the hand-tuned scheduling.=0D >=0D This is a bit confusing. Already for some time, the "official" libm on AXP/Linux **IS** based on fdlibdm !! Especially, the very old sqrt, was that single-bit-a-time version from li= bfdm, later it was replaced by an assembler version of the method you cite. lib= ffm slightly improves on that. It seems strange, that you get near those figu= res with your C version. It seems likely that your timing is governed by oth= er factors, but not (really) sqrt. =46rom your code, I get about 303 ns/sqrt. However, the raw libffm speed = of sqrt is about 120 ns !! Joachim Wesner