From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,fb196a030985e9bc X-Google-Attributes: gid111c93,public X-Google-Thread: 1164f8,fb196a030985e9bc X-Google-Attributes: gid1164f8,public From: "David A. Long" Subject: Re: Is FFT inherently slow on Alpha CPUs? Date: 1999/10/15 Message-ID: <38073D32.CC66BA13@zk3.dec.com>#1/1 X-Deja-AN: 537770796 Content-Transfer-Encoding: 7bit References: <38063F40.8EE3A106@nospam.com> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: iass@lead.zk3.dec.com X-Trace: lead.zk3.dec.com 939998515 1178 16.141.0.166 (15 Oct 1999 14:41:54 GMT) Organization: Compaq Computer Corporation Mime-Version: 1.0 NNTP-Posting-Date: 15 Oct 1999 14:41:54 GMT Newsgroups: comp.os.linux.alpha,comp.sys.dec >I realized that sine and cosine are the Achilles heel of the Alpha CPU. A lot of the time (perhaps most of the time) apparent problems with floating point performance on Alphas are due to the standards requirements for signaling error conditions. If you have not done so already, I suggest trying the following before concluding the hardware might be inherently slow: 1) Get the free Compaq Portable Math Library (CPML) for Linux, and the free beta-test Compaq C compiler for Linux from: http://www.unix.digital.com/linux/software.htm 2) Consult the cc manpage for descriptions of "-fast". The "-fast" option causes, in part, the following to be set: -O3 -assume nomath_errno -D_INTRINSICS -D_INLINE_INTRINSICS -D_FASTMATH -fp_reorder -intrinsics which should be relevant to your goal. The other things it sets can also help performance, but if their description concerns you you can try explicitly specifying just the above options. 3) Build your application with "cc -fast", and link it with CPML in place of the default Linux libm. If you are not using C, there is a FORTRAN compiler on the web page too. Consult the documentation that comes with it for similar issues. If you are using C++, keep consulting the web page for future developments. These options can make a substantial difference, but you must carefully consider the implications of turning off full math routine error reporting. Other things that can help performance are making sure that, if you are using "-std0", you also consider using "-float" to prevent automatic promotion of float's to double (K&R C). At the same time you should be sure to use sinf() for calculations involving all float's, as opposed to sin() (or the equivalent for other math routines), and use the proper data types for all variables and constants. Those last two points should apply to any standards conforming vendor/platform. Having said all this, there is a set of high performance FFT functions in one of the libraries associated with FORTRAN. I do not know if this is in the FORTRAN kit on our Linux web page. The library used to be called DXML, and is presumably now called CXML. -- -dl David A. Long Compaq Tru64 UNIX Development Environments Group Compaq Computer Corporation