From: stevenj@alum.mit.edu (Steven G. Johnson)
Subject: Re: Using DEC compilers on a Linux Alpha cluster
Date: 1998/07/30 [thread overview]
Message-ID: <stevenj-ya02408000R3007980110300001@news.mit.edu> (raw)
In-Reply-To: 35BECDE5.559DE104@mema.ucl.ac.be
Xavier Gallez <gallez@mema.ucl.ac.be> wrote:
>main memory in a very efficient way, while gcc does not. Concerning the
>type of arithmetic operations, FFTW uses intensively tabulated values in
>order to limit math library calls. As I understand it, there are only a
>few calls to sin and cos at each iteration, many less than explicit
>additions and multiplications. It would be a good idea to check the FFTW
I thought I'd chime in here, since I am one of the authors of FFTW.
Yes, FFTW uses precomputed trig. values, so there are actually no math
library calls during the execution of the FFT (which is what you are
benchmarking).
What you are seeing in your benchmarks of FFTW, to the best of my
understanding, is this:
For small transforms, the computation time is dominated by floating-point
operations (adds & mults), which primarily take place in long blocks (~1000
lines) of heavily optimized code (generated by a special program). This
code is structured in such a way as to give the compiler maximum
opportunity to optimize register usage & schedule instructions, and the
quality of the compiler makes a big difference. Unfortunately, gcc is
known to be poor at these things--it doesn't really "know" enough about the
pipelines of modern superscalar CPUs.
For large transforms, time is dominated by memory I/O. FFT algorithms are
harder on the cache than most other types of numerical computation, and so
are especially dependent upon how much memory locality we can squeeze out
of them. The compiler has relatively little influence on memory access
patterns, and thus you don't see as much difference here between DEC cc and
gcc.
Cordially,
Steven G. Johnson
next prev parent reply other threads:[~1998-07-30 4:00 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-07-28 4:00 Using DEC compilers on a Linux Alpha cluster Xavier Gallez
1998-07-28 4:00 ` Greg Lindahl
1998-07-29 4:00 ` Xavier Gallez
1998-07-29 4:00 ` Joachim Wesner
1998-07-29 4:00 ` Greg Lindahl
1998-08-03 4:00 ` Steve Peltz
1998-07-30 4:00 ` Steven G. Johnson [this message]
1998-07-30 4:00 ` Greg Lindahl
1998-07-29 4:00 ` Lev Gelb
1998-07-29 4:00 ` Xavier Gallez
1998-07-29 4:00 ` Lev Gelb
1998-07-29 4:00 ` Joachim Wesner
1998-07-30 4:00 ` Robert Harley
1998-07-30 4:00 ` Joachim Wesner
1998-07-31 4:00 ` Xiaoguang Zhang
1998-07-31 4:00 ` Joachim Wesner
1998-08-05 4:00 ` David Cherkus
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