[FFmpeg-devel] [PATCH 1/2] lavfi: check links properties after configuring them.
Nicolas George
george at nsup.org
Thu Nov 2 13:31:01 EET 2017
Le primidi 11 brumaire, an CCXXVI, Clement Boesch a écrit :
> My bad, you're right, I was looking at the wrong header with the same
> variable names. Dismiss my comment.
Ok, series pushed.
> I'd say that a counter is unlikely to require a sign vs unsigned
> optimization (and if it does and we know the counter is positive only, we
> can explicit it with bit shifts etc). OTOH, the compiler will always have
> to assume an overflow can happen if the initial counter value comes from
> another variable, and you can't do much to hint it about it. Assuming a
> loop overflow has IMO much more impact of what the compiler can do in the
> general logic of the loop. But that's pure speculation from me.
I find the conclusion that lying to the compiler would help it make the
code faster it hard to swallow.
I think the real logic is this: unsigned, since they have a much simpler
semantic, have been optimized efficiently by compilers for a long time.
Recently, compilers have learned to use undefined behaviours to optimize
signed further, almost as much as unsigned. But not better.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171102/3d6c4faf/attachment.sig>
More information about the ffmpeg-devel
mailing list