[FFmpeg-devel] Fixpoint FFT optimization, with MDCT and IMDCT wrappers for audio optimization
Mon Jul 30 01:18:40 CEST 2007
On Sun, Jul 29, 2007 at 06:02:19PM -0400, Marc Hoffman wrote:
> On 7/29/07, Trent Piepho <xyzzy at speakeasy.org> wrote:
> > In your code, m could be negative, if c->nbits is 31. Though in Loren's
> > example gcc does know the value is never negative, but the strength
> > reduction code doesn't seem to take that into account. If you do:
> > for(i=0;i<100;i++) if(i>1000) bar();
> > gcc is smart enough to completely optimize the if statement away.
> So much stuff to keep in mind when coding C for performance. Thanks
> for helping me understand this in more detail.
Well, if performance really matters there is only one thing to keep in
mind: look at what the compiler creates. Beat it until it's not total
crap. If that doesn't work, do it in assembler...
Though few people will actually bother unless it is really, really
important, they have time to waste, or it is an embedded system (and
even there are people who have developed a Java VM for those)...
More information about the ffmpeg-devel