[Ffmpeg-devel] yet another silly int vs. float benchmark
Balatoni Denes
dbalatoni
Sat May 21 20:15:01 CEST 2005
Hi!
-- Pentium 4 Willamette (1.5ghz), gcc -O3 -fomit-frame-pointer
100 ; needed 84 cycles -> 84 cycles per operation
100 iv[0]+=iv[1];iv[1]+=iv[0]; needed 152 cycles -> 76 cycles per
operation
100 iv[0]*=iv[1];iv[1]*=iv[0]; needed 2840 cycles -> 1420 cycles per
operation
100 fv[0]+=fv[1];fv[1]+=fv[0]; needed 3504 cycles -> 1752 cycles per
operation
100 fv[0]*=fv[1];fv[1]*=fv[0]; needed 1448 cycles -> 724 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
264 cycles -> 52 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
660 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
-- Pentium 4 Willamette (1.5ghz), gcc -O3 -msse -mfpmath=sse
-fomit-frame-pointer
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 848 cycles -> 424 cycles per
operation
100 fv[0]*=fv[1];fv[1]*=fv[0]; needed 1252 cycles -> 626 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
268 cycles -> 53 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
2388 cycles -> 477 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
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
-- Pentium P54CQS (100 mhz) , gcc -O3 -fomit-frame-pointer
100 ; needed 13 cycles -> 13 cycles per operation
100 iv[0]+=iv[1];iv[1]+=iv[0]; needed 216 cycles -> 108 cycles per
operation
100 iv[0]*=iv[1];iv[1]*=iv[0]; needed 1815 cycles -> 907 cycles per
operation
100 fv[0]+=fv[1];fv[1]+=fv[0]; needed 780 cycles -> 390 cycles per
operation
100 fv[0]*=fv[1];fv[1]*=fv[0]; needed 618 cycles -> 309 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
270 cycles -> 54 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
4521 cycles -> 904 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
530 cycles -> 106 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
1029 cycles -> 205 cycles per operation
bye
Denes
--
- Use the Source Luke ! -
More information about the ffmpeg-devel
mailing list