[FFmpeg-devel] [PATCH 4/4] lavc/fft-test: update benchmark code

Ganesh Ajjanagadde gajjanag at gmail.com
Fri Mar 25 17:11:10 CET 2016


On Fri, Mar 25, 2016 at 7:53 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Thu, Mar 24, 2016 at 05:50:52PM -0700, Ganesh Ajjanagadde wrote:
>> 1. The most important change is the addition of a permute call to ensure
>> that the comparison between fftw and avfft is fair, since fftw does not
>> require the call. This is evident from the test code additions in the
>> previous commit, and also from http://www.fftw.org/benchfft/.
>
> So FFTW is slower than AVFFT
> but FFTW is faster than AVFFT + fft_permute ?

As can be seen from the benchmarks above, with  fft_permute it is not
a clear cut case, i.e for small lengths (< 512) they are roughly
similar, but performance of avfft tanks for longer lengths relative to
fftw.

BTW, fftw has multithreading options, these benches don't exercise them.

>
> or do i misunderstand ?

I did not give detailed info on this front, sorry. Turns out the
conclusions change, at least on my Haswell, fixed clock to 1.9 GHz
(same settings as for benches above). Without fft_permute, avfft is
faster throughout:
FFT 4 test
Checking...
max:0.000000 e:0
Speed test...
time: 0.10 us/transform [total time=1.71 s its=16777216]
FFTW 4 test
Checking...
max:0.000000 e:0
Speed test...
time: 0.11 us/transform [total time=1.86 s its=16777216]
FFT 8 test
Checking...
max:0.000000 e:5.21541e-08
Speed test...
time: 0.11 us/transform [total time=1.88 s its=16777216]
FFTW 8 test
Checking...
max:0.000000 e:6.70552e-08
Speed test...
time: 0.13 us/transform [total time=1.10 s its=8388608]
FFT 16 test
Checking...
max:0.000000 e:8.73796e-08
Speed test...
time: 0.13 us/transform [total time=1.10 s its=8388608]
FFTW 16 test
Checking...
max:0.000000 e:1.0382e-07
Speed test...
time: 0.17 us/transform [total time=1.40 s its=8388608]
FFT 32 test
Checking...
max:0.000000 e:1.63922e-07
Speed test...
time: 0.07 us/transform [total time=1.10 s its=16777216]
FFTW 32 test
Checking...
max:0.000000 e:1.92857e-07
Speed test...
time: 0.17 us/transform [total time=1.40 s its=8388608]
FFT 64 test
Checking...
max:0.000001 e:3.09466e-07
Speed test...
time: 0.12 us/transform [total time=1.05 s its=8388608]
FFTW 64 test
Checking...
max:0.000001 e:3.12211e-07
Speed test...
time: 0.24 us/transform [total time=1.03 s its=4194304]
FFT 128 test
Checking...
max:0.000002 e:4.97895e-07
Speed test...
time: 0.26 us/transform [total time=1.11 s its=4194304]
FFTW 128 test
Checking...
max:0.000002 e:6.00477e-07
Speed test...
time: 0.51 us/transform [total time=1.08 s its=2097152]
FFT 256 test
Checking...
max:0.000003 e:8.80516e-07
Speed test...
time: 0.62 us/transform [total time=1.30 s its=2097152]
FFTW 256 test
Checking...
max:0.000004 e:8.57262e-07
Speed test...
time: 0.80 us/transform [total time=1.67 s its=2097152]
FFT 512 test
Checking...
max:0.000008 e:1.25487e-06
Speed test...
time: 1.28 us/transform [total time=1.35 s its=1048576]
FFTW 512 test
Checking...
max:0.000004 e:1.31007e-06
Speed test...
time: 1.36 us/transform [total time=1.43 s its=1048576]
FFT 1024 test
Checking...
max:0.000008 e:1.90538e-06
Speed test...
time: 2.75 us/transform [total time=1.44 s its=524288]
FFTW 1024 test
Checking...
max:0.000010 e:1.94271e-06
Speed test...
time: 2.81 us/transform [total time=1.47 s its=524288]
FFT 2048 test
Checking...
max:0.000015 e:2.83741e-06
Speed test...
time: 6.19 us/transform [total time=1.62 s its=262144]
FFTW 2048 test
Checking...
max:0.000015 e:3.02253e-06
Speed test...
time: 7.18 us/transform [total time=1.88 s its=262144]
FFT 4096 test
Checking...
max:0.000023 e:4.2942e-06
Speed test...
time: 15.24 us/transform [total time=2.00 s its=131072]
FFTW 4096 test
Checking...
max:0.000023 e:4.43059e-06
Speed test...
time: 16.20 us/transform [total time=1.06 s its=65536]
FFT 8192 test
Checking...
max:0.000031 e:6.37783e-06
Speed test...
time: 32.57 us/transform [total time=1.07 s its=32768]
FFTW 8192 test
Checking...
max:0.000037 e:6.65281e-06
Speed test...
time: 37.62 us/transform [total time=1.23 s its=32768]
FFT 16384 test
Checking...
max:0.000046 e:9.52666e-06
Speed test...
time: 70.86 us/transform [total time=1.16 s its=16384]
FFTW 16384 test
Checking...
max:0.000046 e:1.00169e-05
Speed test...
time: 87.51 us/transform [total time=1.43 s its=16384]
FFT 32768 test
Checking...
max:0.000076 e:1.39189e-05
Speed test...
time: 158.88 us/transform [total time=1.30 s its=8192]
FFTW 32768 test
Checking...
max:0.000076 e:1.47434e-05
Speed test...
time: 196.77 us/transform [total time=1.61 s its=8192]

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> You can kill me, but you cannot change the truth.
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list