[FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

Ganesh Ajjanagadde gajjanag at mit.edu
Sat Nov 28 22:19:58 CET 2015


On Sat, Nov 28, 2015 at 3:29 PM, Derek Buitenhuis
<derek.buitenhuis at gmail.com> wrote:
> On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote:
>> +        if (i % 4 == 0)
>
> I doubt it particularly matters in this case, but you can
> avoid a modulo operator here with i & 3, like elsewhere
> in the file. I doubt the compiler is that dumb, though.
> Same for other occurrences.

I actually prefer keeping all at i % 4, since that conveys intent
better IMHO, and would change uniformly to that. It takes a reader a
couple of seconds extra to register what i & 3 is doing for no gain in
C code. No compiler I know of in 2015 has issues with such
trivialities.

>
> - Derek
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


More information about the ffmpeg-devel mailing list