On Sun, Nov 1, 2015 at 5:54 PM, Michael Niedermayer
wrote:
> On Sun, Nov 01, 2015 at 12:19:47PM -0500, Ganesh Ajjanagadde wrote:
>> This is of use for defining comparator callbacks. Common approaches like
>> return x-y are not safe due to the risks of overflow.
>> Furthermore, the (x > y) - (x < y
On Sun, Nov 01, 2015 at 12:19:47PM -0500, Ganesh Ajjanagadde wrote:
> This is of use for defining comparator callbacks. Common approaches like
> return x-y are not safe due to the risks of overflow.
> Furthermore, the (x > y) - (x < y) trick is optimized to branchless
> code.
> This also documents