
Swap Two Variables Without Using a Temp Variable - glazskunrukitis
http://chris-taylor.github.com/blog/2013/02/25/xor-trick/
======
brockrockman
while this is taking a mathematical/theoretical approach, it's worth
reiterating that a modern compiler won't even bother allocating temporary
variables on the stack and the values will just move between registers.

Moreover, most modern CPU architectures will just fake the architectural
register moves and just use register renaming techniques to avoid the issue
completely.

TL;DR: any trick like this will just make your code slower and just use more
architectural registers since neither the compiler nor the hardware will be
able to reason about your intentions

