Article View: gnu.gcc.help
Article #252Re: Question on optimizing "abs()"
From: Paul Eggert
Date: Sat, 15 Aug 1992 00:09
Date: Sat, 15 Aug 1992 00:09
8 lines
751 bytes
751 bytes
schmid@deneb.cbmvax.cbm.commodore.com (Bob Schmid) writes: >I would like to write code for gcc 2.2 that will take the absolute >value of a double in the fastest possible way. Why not just use the `fabs' function? On my machine (GCC 2.2.2 -O, Sparc, SunOS 4.1.2) `fabs' takes just one machine instruction, e.g. `fabss %f0,%f0'.
Technical Details
Message-ID:
<bjh`-lLh@twinsun.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggertReferences:
<34264@cbmvax.commodore.com>Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!ucla-cs!twinsun!eggert From: eggert@twinsun.com (Paul Eggert) Subject: Re: Question on optimizing "abs()" Message-ID: <bjh`-lLh@twinsun.com> Sender: usenet@twinsun.com Nntp-Posting-Host: farside Organization: Twin Sun, Inc References: <34264@cbmvax.commodore.com> Distribution: gnu.gcc.help Date: Sat, 15 Aug 1992 00:09:40 GMT Lines: 8