[FFmpeg-devel] [PATCH] mpegaudio: simplify failed optimisation attempt

Michael Niedermayer michaelni
Wed May 6 12:22:33 CEST 2009

On Wed, May 06, 2009 at 09:39:09AM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> > On Tue, May 05, 2009 at 06:18:44PM +0100, Mans Rullgard wrote:
> >> Total speedup 50% on PPC G4, 13% on ARM.
> >> ---
> >>  libavcodec/mpegaudiodec.c |   17 ++++++-----------
> >>  1 files changed, 6 insertions(+), 11 deletions(-)
> >
> > why is it faster?
> > Is this a workaround for a gcc bug? If so i do not think removing
> > optimizations that gcc chokes on is the correct solution.
> > Naively SUM8P2 should be faster because it does fewer memory reads.
> I agree that SUM8P2 looks faster, but gcc apparently makes a big mess
> of it.  

on all gcc versions? at all -O levels?
and could you post the mess it makes, maybe someone has an idea how to
avoid it ...

> If the patch was doing the opposite, adding an "optimisation"
> making the code slower, it would surely be rejected.

yes, but i suspect it was faster when it was added, that makes it at least
2 cases (in the past faster, now slower) and SUM8P2 should be faster when the
compiler doesnt mess up.

Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090506/cb060b17/attachment.pgp>

More information about the ffmpeg-devel mailing list