[FFmpeg-devel] [PATCH] avutil/avstring: Inline some tiny functions

Ganesh Ajjanagadde gajjanag at mit.edu
Sat Sep 26 18:48:26 CEST 2015

On Sat, Sep 26, 2015 at 12:26 PM, Henrik Gramner <henrik at gramner.com> wrote:
> On Sat, Sep 26, 2015 at 6:10 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
>> Have you compared with av_always_inline?
> No, other functions in that header used "inline", so I went with the
> same for consistency. But I guess we could change those as well if
> av_always_inline is preferable.

Commit  06eb4f0885746b7e8a652d7b6026abf834e04b73 has a fairly detailed
explanation of av_always_inline. Essentially the question is: do we
trust the compiler to do the right thing here? In the worst case, the
compiler will not inline it, in which case what is the performance
My suspicion is that the loss is not that bad, and since there is no
inline asm, the compiler in all likelihood won't need the

Thus either one should be ok (pick whichever you prefer), and so LGTM.

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

More information about the ffmpeg-devel mailing list