BTS/BTR performance

From: Christian Neubert (spamtrap_at_crayne.org)
Date: 10/17/04


Date: Sun, 17 Oct 2004 17:53:39 +0000 (UTC)

I want to know which way is faster:

mov ebx,1
shl ebx,cl

mov edx,[esi+4*eax]
xor edx,ebx
mov [esi+4*eax],edx

or

mov edx,[esi+4*eax]
btr edx,ecx
mov [esi+4*eax],edx

And would it be faster if I write it so:

xor [esi+4*eax],ebx

or

btr [esi+4*eax],ecx

FlashBurn



Relevant Pages

  • Re: Hashing
    ... > mov ecx,eax ... > xor ebx,ebx ... > shl ebx,16 ... > shr eax,11 ...
    (alt.lang.asm)
  • Re: BTS/BTR performance
    ... shl ebx,cl ... mov edx, ... btr edx,ecx ... xor,ebx ...
    (comp.lang.asm.x86)
  • Re: NASM HelloWorld - DOS
    ... xor ax,ax ... int 0x1A ... mov WORD,dx ... shl cx,1 ...
    (alt.lang.asm)
  • Re: Hashing
    ... push ebx ... mov ecx,eax ... xor ebx,ebx ... Its a hash function quality ...
    (alt.lang.asm)
  • PutPixel v2.0
    ... keep using the SHL opcode, which performs an extremely fast power of ... Now, for use with a specific resolution, the best, fastest code would ... cells di mov \ buffer address to EDI ... The Y*320 calculation is performed by a pair of SHL (bit shift left) ...
    (comp.lang.forth)