<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.6.0">
</HEAD>
<BODY>
On Thu, 2012-10-25 at 16:19 -0400, Bradley Lucier wrote:<BR>
<BR>
<BLOCKQUOTE TYPE=CITE>
    This has the following effect on the time to compute 10,000 forward and 10,000 backward complex FFTs of 1,024 elements.<BR>
    <BR>
    With -fno-strict-aliasing (used now by Gambit for reasons I'll explain below):<BR>
    <BR>
    (time (do ((i 0 (fx+ i 1))) ((fx= i 10000)) (direct-fft-recursive-4 a table) (inverse-fft-recursive-4 a table) (do ((i 0 (fx+ i 1))) ((fx= i (fx* two^n 2))) (f64vector-set! a i (fl/ (f64vector-ref a i) inexact-two^n)))))<BR>
        705 ms real time<BR>
        704 ms cpu time (704 user, 0 system)<BR>
        6 collections accounting for 2 ms real time (0 user, 0 system)<BR>
        1600000 bytes allocated<BR>
        22 minor faults<BR>
        no major faults<BR>
    <BR>
    With -fstrict-aliasing:<BR>
    <BR>
    (time (do ((i 0 (fx+ i 1))) ((fx= i 10000)) (direct-fft-recursive-4 a table) (inverse-fft-recursive-4 a table) (do ((i 0 (fx+ i 1))) ((fx= i (fx* two^n 2))) (f64vector-set! a i (fl/ (f64vector-ref a i) inexact-two^n)))))<BR>
        590 ms real time<BR>
        592 ms cpu time (588 user, 4 system)<BR>
        6 collections accounting for 2 ms real time (4 user, 0 system)<BR>
        1600000 bytes allocated<BR>
        22 minor faults<BR>
        no major faults<BR>
    <BR>
    That's a 19% performance improvement.  (And the performance isn't bad, 1.74 GFLOPS on my 2.33GHz Core 2 quad 6600.  Later I'll try to get gcc to vectorize the main loop.)<BR>
</BLOCKQUOTE>
<BR>
I should have said which OS, gcc, and configuration I was using:<BR>
<BR>
heine:~/programs/gambit> gsc -v<BR>
v4.6.6 20121013190232 x86_64-unknown-linux-gnu "./configure 'CC=gcc -march=native -fschedule-insns -frename-registers' '--enable-single-host' '--enable-multiple-versions' '--enable-shared'"<BR>
<BR>
<BR>
heine:~/programs/gambit> gcc -v<BR>
Using built-in specs.<BR>
COLLECT_GCC=gcc<BR>
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper<BR>
Target: x86_64-linux-gnu<BR>
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu<BR>
Thread model: posix<BR>
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1) <BR>
<BR>
model name      : Intel(R) Core(TM)2 Quad  CPU   Q8200  @ 2.33GHz<BR>
<BR>
Brad
</BODY>
</HTML>