On Friday, 22 May 2015 at 05:24:15 UTC, Jay Norwood wrote:

first result uses
if (((x-1)&(x|0x80000000))==0)

00F81005  mov         eax,edx
00F81007  lea         ecx,[edx-1]
00F8100A  or          eax,80000000h
00F8100F  test        ecx,eax

Above is what a Microsoft C++ compiler does with the first expression. It gets inserted in-line in the test.

Reply via email to