[Ffmpeg-devel] Fixed vs. Floating Point AAC

Luca Barbato lu_zero
Sun Mar 12 15:21:45 CET 2006


Loren Merritt wrote:
> On Thu, 9 Mar 2006, Michael Niedermayer wrote:
> 
>> so reusing some benchmark proggy here are the results, nicely written and
>> source attached, feel free to design your own cpu which can do
>> integer multiplies faster then floatingpoint ones
>>

100 ;     1 cycles,  0.01 cycles/op
100 iv[0]+=iv[1];iv[1]+=iv[0];    48 cycles,  0.23 cycles/op
100 iv[0]*=iv[1];iv[1]*=iv[0];    60 cycles,  0.29 cycles/op
100 iv[0]=(iv[0]*(int64_t)iv[1])>>32;iv[1]=(iv[0]*(int64_t)iv[1])>>32;
 127 cycles,  0.63 cycles/op
100 fv[0]+=fv[1];fv[1]+=fv[0];    87 cycles,  0.43 cycles/op
100 fv[0]*=fv[1];fv[1]*=fv[0];    88 cycles,  0.43 cycles/op
100 iv[0]+=iv[1];iv[1]+=iv[2];iv[2]+=iv[3];iv[3]+=iv[4];iv[4]+=iv[0];
 84 cycles,  0.17 cycles/op
100 iv[0]*=iv[1];iv[1]*=iv[2];iv[2]*=iv[3];iv[3]*=iv[4];iv[4]*=iv[0];
 84 cycles,  0.17 cycles/op
100
iv[0]=(iv[0]*(int64_t)iv[1])>>32;iv[1]=(iv[2]*(int64_t)iv[1])>>32;iv[2]=(iv[2]*(int64_t)iv[3])>>32;iv[3]=(iv[3]*(int64_t)iv[4])>>32;iv[4]=(iv[4]*(int64_t)iv[0])>>32;
  624 cycles,  1.25 cycles/op
100 fv[0]+=fv[1];fv[1]+=fv[2];fv[2]+=fv[3];fv[3]+=fv[4];fv[4]+=fv[0];
 84 cycles,  0.17 cycles/op
100 fv[0]*=fv[1];fv[1]*=fv[2];fv[2]*=fv[3];fv[3]*=fv[4];fv[4]*=fv[0];
 84 cycles,  0.17 cycles/op

Too lazy to think about prettify this, question: how SIMD fit in the mix?

lu

-- 

Luca Barbato

Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero





More information about the ffmpeg-devel mailing list