Hello, On Mon, Aug 24, 2009 at 6:09 AM, Loren Merritt<lorenm at u.washington.edu> wrote:
1.6x faster than altivec radix-2 as measured by fft-test on a G4. 2.0x as measured by gprof.
Outstanding!
I failed to get oprofile or POWERPC_PERF to measure anything.
Don't use that, it doesn't work.
This is my first time writing ppc asm, so any optimization hints are appreciated.
I'll try to do my best.
I used raw asm rather than intrinsics because gcc adds a ginormous overhead to each function call. Is there anything I need to do to make it work on ppc64, if it doesn't already?
I'll look into this. I think all you need to do is avoid refering to the general purpose registers' name explicitely. You patch doesn't apply cleanly here: patch -p1 --dry-run < ../fft_altivec.diff patching file libavcodec/Makefile Hunk #1 FAILED at 523. 1 out of 1 hunk FAILED -- saving rejects to file libavcodec/Makefile.rej patching file libavcodec/fft.c Hunk #1 FAILED at 110. 1 out of 1 hunk FAILED -- saving rejects to file libavcodec/fft.c.rej patching file libavcodec/ppc/fft_altivec.c Hunk #1 FAILED at 1. Hunk #2 FAILED at 22. Hunk #3 FAILED at 30. 3 out of 3 hunks FAILED -- saving rejects to file libavcodec/ppc/fft_altivec.c.rej patching file libavcodec/ppc/fft_altivec_s.S patching file libavcodec/ppc/types_altivec.h Hunk #1 FAILED at 30. 1 out of 1 hunk FAILED -- saving rejects to file libavcodec/ppc/types_altivec.h.rej patch -p1 --dry-run < ../cleanup.diff patching file libavcodec/dsputil.h Hunk #1 FAILED at 691. 1 out of 1 hunk FAILED -- saving rejects to file libavcodec/dsputil.h.rej patching file libavcodec/fft.c Hunk #1 FAILED at 60. Hunk #2 FAILED at 68. Hunk #3 FAILED at 107. 3 out of 3 hunks FAILED -- saving rejects to file libavcodec/fft.c.rej Did I miss something? Guillaume -- Only a very small fraction of our DNA does anything; the rest is all comments and ifdefs. Mike Ditka - "If God had wanted man to play soccer, he wouldn't have given us arms." - http://www.brainyquote.com/quotes/authors/m/mike_ditka.html