[Mplayer-users] a suggestion ..

pl p_l at tfz.net
Mon Jul 9 18:51:54 CEST 2001


Hi,

On Mon, Jul 09, 2001 at 10:28:19PM +0900, Yang Hyun wrote:
[...]
>   I found that functions of "idtc_mmx.c" was  called  many time.
>   I have heard  Macro Functions are better than Inline Functions  in Speed .
>   I think  the functions of "idtc_mmx.c" is easy to be chaged to Macro func.
>    eg) block_copy,block_add function
[..]
That's not always true: if your macro is quite big you may run slower because
of cache effects. inline is juste an advice given to gcc, IIRC:
when you declare a function "inline", gcc tries to inline it if it can and 
"thinks" the inlining is valuable.  If inlined, the output should be 
(is ?) very close to the output you would have got if it had been a macro.

>   and there are many codes which  must be  chaged to  "shift operator" .
>    eg)   DCT_offset = stride * 8;
>         -> DCT_offset = stride << 3;
[...]
That may have been true in the past but nowadays, most compiler tend to optimize
such constructions (multiplication by a constant) by correctly generating a bitshift
or more efficient code if it's not a 2^n.

Regards.
--
pl

_______________________________________________
Mplayer-users mailing list
Mplayer-users at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-users



More information about the MPlayer-users mailing list