这两者之间有什么区别,比如一个更快还是更小?使用一个在另一个上的好处?
int a, b; a ^= b ^= a ^= b;
int a, b, temp; temp = a; a = b; b = temp;
c swap xor
c ×1
swap ×1
xor ×1