Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
From: "David A. Long" <dlong@zk3.dec.com>
Subject: Re: Is FFT inherently slow on Alpha CPUs?
Date: 1999/10/15	[thread overview]
Message-ID: <38073D32.CC66BA13@zk3.dec.com> (raw)
In-Reply-To: 38063F40.8EE3A106@nospam.com

>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



  parent reply	other threads:[~1999-10-15  4:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-10-14  4:00 Is FFT inherently slow on Alpha CPUs? G. Hugh SONG
1999-10-14  4:00 ` James Van Buskirk
1999-10-15  4:00   ` Stephen E. Halpin
1999-10-14  4:00 ` Michal Jaegermann
1999-10-14  4:00 ` Christian Simmendinger
1999-10-14  4:00 ` Paul Bourke
1999-10-14  4:00 ` W. Kyle Gilbertson
1999-10-15  4:00 ` David A. Long [this message]
1999-10-19  4:00   ` Greg Lindahl
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox