From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,c6ee262d6492cc0e X-Google-Attributes: gid111c93,public From: stevenj@alum.mit.edu (Steven G. Johnson) Subject: Re: Using DEC compilers on a Linux Alpha cluster Date: 1998/07/30 Message-ID: #1/1 X-Deja-AN: 376376589 Content-Transfer-Encoding: 8bit References: <35BDDDA7.F1EB5084@mema.ucl.ac.be> <6pkpqs$92d@news1.newsguy.com> <35BECDE5.559DE104@mema.ucl.ac.be> Content-Type: text/plain; charset=ISO-8859-1 Organization: Massachusetts Institute of Technology Mime-Version: 1.0 Newsgroups: comp.os.linux.alpha Xavier Gallez 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