[Ffmpeg-devel] yet another silly int vs. float benchmark

matthieu castet castet.matthieu
Sat May 21 19:19:57 CEST 2005


Hi,

Michael Niedermayer wrote:
> Hi
> 
> heres another benchmark proggy, advantages over the others
> 1. pure c
> 2. ~40 lines of code, can be easily done in less i know ...
> 3. tries to test both the case where each instruction depends upon the 
> previous one and where the instructions are a little more independant
> 
> 
athlon-xp 1800+

100 ; needed    11 cycles ->    11 cycles per operation
100 iv[0]+=iv[1];iv[1]+=iv[0]; needed   204 cycles ->   102 cycles per 
operation
100 iv[0]*=iv[1];iv[1]*=iv[0]; needed   796 cycles ->   398 cycles per 
operation
100 fv[0]+=fv[1];fv[1]+=fv[0]; needed   720 cycles ->   360 cycles per 
operation
100 fv[0]*=fv[1];fv[1]*=fv[0]; needed   720 cycles ->   360 cycles per 
operation
100 iv[0]+=iv[1];iv[1]+=iv[2];iv[2]+=iv[3];iv[3]+=iv[4];iv[4]+=iv[5]; 
needed   211 cycles ->    42 cycles per operation
100 iv[0]*=iv[1];iv[1]*=iv[2];iv[2]*=iv[3];iv[3]*=iv[4];iv[4]*=iv[5]; 
needed  1014 cycles ->   202 cycles per operation
100 fv[0]+=fv[1];fv[1]+=fv[2];fv[2]+=fv[3];fv[3]+=fv[4];fv[4]+=fv[5]; 
needed   677 cycles ->   135 cycles per operation
100 fv[0]*=fv[1];fv[1]*=fv[2];fv[2]*=fv[3];fv[3]*=fv[4];fv[4]*=fv[5]; 
needed   513 cycles ->   102 cycles per operation





More information about the ffmpeg-devel mailing list