On Thursday, 23 April 2015 at 10:23:57 UTC, Andrea Fontana wrote:
On Thursday, 23 April 2015 at 10:08:24 UTC, John Colvin wrote:asm.dlang.organd d.godbolt.orgThis isn't a D-specific question though, so gcc.godbolt.org would allow you to test a wider range of backends.I was wondering if compilers can optimize this: uint foo3(uint a) { return a*!(a/5); } That actually gives the same results.
That is cool ! However, careful, division can stall the pipeline.