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

Mike Melanson mike
Sat May 21 19:26:20 CEST 2005


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

VIA x86 CPU 533 MHz:

100 ; needed    27 cycles ->    27 cycles per operation
100 iv[0]+=iv[1];iv[1]+=iv[0]; needed   231 cycles ->   115 cycles per 
operation
100 iv[0]*=iv[1];iv[1]*=iv[0]; needed  1834 cycles ->   917 cycles per 
operation
100 fv[0]+=fv[1];fv[1]+=fv[0]; needed  1194 cycles ->   597 cycles per 
operation
100 fv[0]*=fv[1];fv[1]*=fv[0]; needed  1578 cycles ->   789 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   540 cycles ->   108 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  3545 cycles ->   709 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  2046 cycles ->   409 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  3046 cycles ->   609 cycles per operation


-- 
	-Mike Melanson





More information about the ffmpeg-devel mailing list