[gambit-list] High-performance compiler options

Bradley Lucier lucier at math.purdue.edu
Wed Oct 7 21:29:04 EDT 2009


On Oct 7, 2009, at 2:15 PM, Bradley Lucier wrote:

> With my quickie benchmark program:
>
> gsi/gsi -e '(define a (time (expt 3 10000000)))(define b (time (* a  
> a)))'
>
> the routine (direct-fft-recursive-4 a table) computed the final direct
> (forward) FFT with 2097152 complex elements in 156 ms.  This means  
> that
> we were getting
>
>> (/ (* 5 2097152 21) .156)
> 1411544615.3846154
>
> FLOPS (because it takes $5 N \log_2 N$ floating-point operations for  
> an
> FFT of size N).  So that's 1411 MFLOPS with a 2.33 GHz Core 2 Duo;  
> FFTW
> reports about 2200 MFLOPS on a 3.0 GHz Xeon Core Duo using the Intel
> compiler icc here:
>
> http://www.fftw.org/speed/CoreDuo-3.0GHz-icc64/
>
> The Xeon has a faster memory bus and is generally faster than the  
> Core 2
> Duo clock-per-clock; but just the ratio of CPU speeds would give a  
> rate
> of
>
>> (* 1411 (/ 3.0 2.33))
> 1816.7381974248929
>
> predicted MFLOPS for Gambit.

Perhaps my understanding of current computer architectures is  
deficient :-P.  I rebuilt Gambit on

model name      : Intel(R) Xeon(R) CPU           X5460  @ 3.16GHz

with today's version of gcc and

./configure CC='/pkgs/gcc-mainline/bin/gcc -march=core2 -O3 -fschedule- 
insns' --enable-multiple-versions --enable-single-host --prefix=/pkgs/ 
Gambit-C

and I got a time of 180 ms for the same FFT.  So that's about 1222  
MFLOPS.  Since FFTW was running on a 3.0 GHz machine, that means an  
estimate of Gambit running at 1161 MFLOPS on the 3.0 GHz machine that  
the FFTW folks were using.  So FFTW seems to still be about twice as  
fast as the Gambit code.

I tried to build BenchFFT to compare FFTW and Gambit on the same  
machine, but one of the FFTs no longer compiles with a modern C++  
compiler.

Brad


More information about the Gambit-list mailing list