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

Måns Rullgård mru
Sat May 21 18:52:43 CEST 2005


Michael Niedermayer <michaelni at gmx.at> writes:

> 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

1.8GHz Pentium4-M:

100 ; needed    84 cycles ->    84 cycles per operation
100 iv[0]+=iv[1];iv[1]+=iv[0]; needed   156 cycles ->    78 cycles per operation
100 iv[0]*=iv[1];iv[1]*=iv[0]; needed  2844 cycles ->  1422 cycles per operation
100 fv[0]+=fv[1];fv[1]+=fv[0]; needed  2556 cycles ->  1278 cycles per operation
100 fv[0]*=fv[1];fv[1]*=fv[0]; needed  1452 cycles ->   726 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   256 cycles ->    51 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  2392 cycles ->   478 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   664 cycles ->   132 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  1052 cycles ->   210 cycles per operation

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list