1. A^=A не будет быстрее, если A - не регистр.
Это вообще невозможно напрямую.
#include <stdlib.h>
int main ( int argc, char *argv[] )
{
int A = 835438;
int B = 823528;
A = 0;
B ^= B;
return EXIT_SUCCESS;
}
gcc -save-temps a.c -o a
.file "a.c"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $16, %esp
movl $835438, -8(%ebp)
movl $823528, -4(%ebp)
movl $0, -8(%ebp)
movl $0, -4(%ebp)
movl $0, %eax
leave
ret
.size main, .-main
.ident "GCC: (GNU) 4.4.4"
.section .note.GNU-stack,"",@progbits