On 18 May 2010 16:12, mike smith <[email protected]> wrote:
> On 18 May 2010 14:19, Dylan Tusler
> <[email protected]> wrote:
>> Is >= slower than > by itself?
>
> Not at all.
>
>        if (foo == 10000)
> 00053EEC  cmp         dword ptr [ebp-54h],2710h
> 00053EF3  jne         CTrimAutoDeployModule::main+8Ch (53EFCh)
>        {
>                foo=0;
> 00053EF5  mov         dword ptr [ebp-54h],0
>        }
>        if (foo > 10000)
> 00053EFC  cmp         dword ptr [ebp-54h],2710h
> 00053F03  jle         CTrimAutoDeployModule::main+9Ch (53F0Ch)
>        {
>                foo=0;
> 00053F05  mov         dword ptr [ebp-54h],0
>        }
>        if (foo >= 10000)
> 00053F0C  cmp         dword ptr [ebp-54h],2710h
> 00053F13  jl          CTrimAutoDeployModule::main+0ACh (53F1Ch)
>        {
>                foo=0;
> 00053F15  mov         dword ptr [ebp-54h],0
>        }
>
> You could optimise the zeroing and compares, but the branches all come
> out the same.
>

And I guess I should remove that test-code. :)

-- 
Meski

"Going to Starbucks for coffee is like going to prison for sex. Sure,
you'll get it, but it's going to be rough" - Adam Hills

Reply via email to