[FFmpeg-devel] [PATCH] make sure initialization happens even after goto fires
Reimar Döffinger
Reimar.Doeffinger
Thu Jul 17 21:22:12 CEST 2008
On Thu, Jul 17, 2008 at 08:14:14PM +0100, M?ns Rullg?rd wrote:
> Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> writes:
> >> The question is, is this as fast? I agree it's nicer structurally.
> >
> > Since gcc 4.3.1 generates exactly the same code, for this case the
> > answer is a clear yes.
>
> Yes, with that compiler.
That is what I meant "this case". So I guess I actually meant "that case"...
Anyway, in principle I think if this is performance critical it
should/"must" be addressed with something like builtin_expect.
Because at least gcc 4.3.1 create code that is maximally unfavourable
for the case that the source seems to prefer, namely with the
pc->frame_start_found conditional jump it jumps to the end of the
function where it does the i++ and then jumps back into the middle of
the function for the code after "found".
Greetings,
Reimar D?ffinger
More information about the ffmpeg-devel
mailing list