On 4/23/2015 3:23 AM, Andrea Fontana wrote:
> I was wondering if compilers can optimize this:
>
> uint foo3(uint a)
> {
> return a*!(a/5);
> }
>
> That actually gives the same results.
A fun article about these sorts of things:
http://www.davespace.co.uk/blog/20150131-branchless-sequences.html