Value stored at location x and y variables pointer exchange pointed stored, you do not need to be a third position for storing temporary variables. This way is not a performance advantage.
void replace(int *x, int *y) { *y = *x ^ *y; *x = *x ^ *y; *y = *x ^ *y; }