[gst-devel] [gst-cvs] gstreamer: micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers
Xavier Bestel
xavier.bestel at free.fr
Fri Dec 3 14:00:04 CET 2010
On Fri, 2010-12-03 at 12:59 +0100, Edward Hervey wrote:
> > > micro-optim: if (x) is cheaper than if (x > 0) for unsigned integers
> >
> > I really really dislike this change. Is it really worth it?
>
> I saw gcc asm where it was doing an expensive compare as opposed to a
> fast != 0. So yes, needed. Worth it ? Well I did title it "micro-optim".
I'd say the bug is with gcc, not gstreamer.
A different compiler may generate correct code for this.
Xav
More information about the gstreamer-devel
mailing list