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

Henrik Gramner henrik at gramner.com
Sat Sep 26 22:16:29 CEST 2015


On Sat, Sep 26, 2015 at 7:23 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> On Sat, Sep 26, 2015 at 1:18 PM, Hendrik Leppkes <h.leppkes at gmail.com> wrote:
>> On Sat, Sep 26, 2015 at 6:48 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
>>> 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
>>> penalty?
>>> 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
>>> av_always_inline.
>>>
>>> Thus either one should be ok (pick whichever you prefer), and so LGTM.
>>
>> The functions were not inline before, so there is no "penality", and only gain.
>> For consistency, picking normal inline should be preferred here.
>
> I meant penalty when comparing inline vs av_always_inline, and not
> current vs proposed patch.
> Anyway, patch is fine.

Thanks, applied.


More information about the ffmpeg-devel mailing list