[FFmpeg-devel] [PATCH] x86: use new gcc atomic built-ins if available
James Almer
jamrial at gmail.com
Sun Oct 26 17:04:05 CET 2014
On 26/10/14 5:34 AM, Reimar Döffinger wrote:
> On 26.10.2014, at 02:32, James Almer <jamrial at gmail.com> wrote:
>> __sync built-ins are considered legacy and will be deprecated.
>> These new memory model aware built-ins have been available since GCC 4.7.0
>
> To me this sounds like "except for tsan, these new functions are worse in every aspect, and that's with gcc 4.9, who knows what mess 4.7 will make of them".
> That sounds like a very bad argument to use them by default.
It's more like "Except for the compare and exchange function, these are either the same
or better/more flexible".
GCC even converts calls certain calls to __sync into the relevant __atomic at built time.
> Nothing against also supporting them, but to make them default I don't think any performance regressions are acceptable, and we need to either test 4.7 as well or there must be a measurable performance advantage.
The only one where it's almost a given a performance hit will be seen is with compare
and excange, and that's why i asked if should keep using the __sync counterpart instead.
The rest are the same, and will potentially perform better if we choose a more relaxed
model.
> IMHO.
> Note that ARM might benefit a lot if you manage to use the less strict versions.
Ah, you just made realize i put x86 in the subject by mistake.
> However since it might not make a difference on x86 testing that they work properly might be difficult.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list