[XviD-devel] Macros ?
suxen_drol
suxen_drol at hotmail.com
Sun Feb 23 10:19:04 CET 2003
On Sat, 22 Feb 2003 21:06:14 +0100 (CET) Christoph Lampert <chl at math.uni-bonn.de> wrote:
>
> Hi,
>
> in ME we define ABS as a macro
>
> #define ABS(X) (((X)>0)?(X):-(X))
>
> which is translated into jumps, not conditional moves (on gcc) or
> bit-arithmetics whereas libc abs() functions should be optimized for the
> corresponding plattform and should always be inline in any reasonable
> compiler.
>
> Should we change that? Or is macro faster on Windows?
> Then we could move it to portab.h
stdlib.h::abs() is faster than ABS() with microsoft vc and gcc, even
though my box doesnt have cmov's
i think we should shift to abs()
>
-- pete; life is like a box of ammo
More information about the XviD-devel
mailing list